drivers/lwnl: Rename lwnl open structure
Usaually a 'priv' is used for inode's private data(upper) or private context data(lower) of private data(upper).
So rename it because if is just a data of upper, not private data attached filep.
@@ -151,7 +151,7 @@ static int lwnl_close(struct file *filep)
struct lwnl_upperhalf_s *upper = inode->i_private;
int ret = OK;
#ifndef CONFIG_DISABLE_POLL
- FAR struct lwnl_open_s *opriv = &upper->ln_open;
+ FAR struct lwnl_open_s *ln_open = &upper->ln_open;
int waiter_idx;
#endif
@@ -170,9 +170,9 @@ static int lwnl_close(struct file *filep)
* Otherwise, an invalid pollfd remains in a list and this slot is not available forever.
*/
for (waiter_idx = 0; waiter_idx < LWNL_NPOLLWAITERS; waiter_idx++) {
- struct pollfd *fds = opriv->io_fds[waiter_idx];
- if (fds && fds->priv == (FAR void *)&opriv->io_fds[waiter_idx]) {
- opriv->io_fds[waiter_idx] = NULL;
+ struct pollfd *fds = ln_open->io_fds[waiter_idx];
+ if (fds && fds->priv == (FAR void *)&ln_open->io_fds[waiter_idx]) {
+ ln_open->io_fds[waiter_idx] = NULL;
}
}
LWNLDEV_UNLOCK(upper);
@@ -244,14 +244,14 @@ static int lwnl_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
FAR struct inode *inode;
FAR struct lwnl_upperhalf_s *upper;
- FAR struct lwnl_open_s *opriv;
+ FAR struct lwnl_open_s *ln_open;
int ret = 0;
DEBUGASSERT(filep && filep->f_inode);
inode = filep->f_inode;
DEBUGASSERT(inode->i_private);
upper = (FAR struct lwnl_upperhalf_s *)inode->i_private;
- opriv = &upper->ln_open;
+ ln_open = &upper->ln_open;
/* Get exclusive access to the driver structure */
LWNLDEV_LOCK(upper);
@@ -265,10 +265,10 @@ static int lwnl_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
int i = 0;
for (; i < LWNL_NPOLLWAITERS; i++) {
/* Find an available slot */
- if (!opriv->io_fds[i]) {
+ if (!ln_open->io_fds[i]) {
/* Bind the poll structure and this slot */
- opriv->io_fds[i] = fds;
- fds->priv = &opriv->io_fds[i];
+ ln_open->io_fds[i] = fds;
+ fds->priv = &ln_open->io_fds[i];
break;
}
}
