RAMLOG: Fix forgotten FARs
This commit is contained in:
parent
c6fc285277
commit
b5a77b9403
|
@ -91,7 +91,7 @@ struct ramlog_dev_s
|
|||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_POLL
|
||||
struct pollfd *rl_fds[CONFIG_RAMLOG_NPOLLWAITERS];
|
||||
FAR struct pollfd *rl_fds[CONFIG_RAMLOG_NPOLLWAITERS];
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -172,7 +172,7 @@ static struct ramlog_dev_s g_sysdev =
|
|||
|
||||
#ifndef CONFIG_DISABLE_POLL
|
||||
static void ramlog_pollnotify(FAR struct ramlog_dev_s *priv,
|
||||
pollevent_t eventset)
|
||||
pollevent_t eventset)
|
||||
{
|
||||
FAR struct pollfd *fds;
|
||||
irqstate_t flags;
|
||||
|
@ -244,8 +244,8 @@ static int ramlog_addchar(FAR struct ramlog_dev_s *priv, char ch)
|
|||
|
||||
static ssize_t ramlog_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
{
|
||||
struct inode *inode = filep->f_inode;
|
||||
struct ramlog_dev_s *priv;
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ramlog_dev_s *priv;
|
||||
ssize_t nread;
|
||||
char ch;
|
||||
int ret;
|
||||
|
@ -253,7 +253,7 @@ static ssize_t ramlog_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
|||
/* Some sanity checking */
|
||||
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = inode->i_private;
|
||||
priv = (FAR struct ramlog_dev_s *)inode->i_private;
|
||||
|
||||
/* If the circular buffer is empty, then wait for something to be written
|
||||
* to it. This function may NOT be called from an interrupt handler.
|
||||
|
@ -417,8 +417,8 @@ errout_without_sem:
|
|||
|
||||
static ssize_t ramlog_write(FAR struct file *filep, FAR const char *buffer, size_t len)
|
||||
{
|
||||
struct inode *inode = filep->f_inode;
|
||||
struct ramlog_dev_s *priv;
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ramlog_dev_s *priv;
|
||||
ssize_t nwritten;
|
||||
char ch;
|
||||
int ret;
|
||||
|
@ -426,7 +426,7 @@ static ssize_t ramlog_write(FAR struct file *filep, FAR const char *buffer, size
|
|||
/* Some sanity checking */
|
||||
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = inode->i_private;
|
||||
priv = (FAR struct ramlog_dev_s *)inode->i_private;
|
||||
|
||||
/* Loop until all of the bytes have been written. This function may be
|
||||
* called from an interrupt handler! Semaphores cannot be used!
|
||||
|
@ -536,7 +536,7 @@ int ramlog_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
|
|||
/* Some sanity checking */
|
||||
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = inode->i_private;
|
||||
priv = (FAR struct ramlog_dev_s *)inode->i_private;
|
||||
|
||||
/* Get exclusive access to the poll structures */
|
||||
|
||||
|
@ -657,7 +657,7 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
|
|||
/* Allocate a RAM logging device structure */
|
||||
|
||||
priv = (struct ramlog_dev_s *)kmm_zalloc(sizeof(struct ramlog_dev_s));
|
||||
if (priv)
|
||||
if (priv != NULL)
|
||||
{
|
||||
/* Initialize the non-zero values in the RAM logging device structure */
|
||||
|
||||
|
|
Loading…
Reference in New Issue