mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
inode/i_private: remove all unnecessary cast for i_private
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -311,7 +311,7 @@ static int btn_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Allocate a new open structure */
|
||||
|
||||
@@ -367,7 +367,7 @@ static int btn_close(FAR struct file *filep)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
@@ -434,7 +434,7 @@ static ssize_t btn_read(FAR struct file *filep, FAR char *buffer,
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that the buffer is sufficiently large to hold at least one
|
||||
* complete sample.
|
||||
@@ -478,7 +478,7 @@ static ssize_t btn_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that the buffer is sufficiently large to hold at least one
|
||||
* complete sample.
|
||||
@@ -530,7 +530,7 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
@@ -657,7 +657,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user