diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-12-05 02:24:56 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-12-05 02:29:28 +0300 |
commit | 450630975da9e7dffe540753e169dc4da5fe7c29 (patch) | |
tree | 69e584ee757fa177d64db1c3c53d816bdab05afb /drivers/staging | |
parent | e5517c2a5a49ed5e99047008629f1cd60246ea0e (diff) | |
download | linux-450630975da9e7dffe540753e169dc4da5fe7c29.tar.xz |
don't open-code file_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/greybus/camera.c | 4 | ||||
-rw-r--r-- | drivers/staging/greybus/es2.c | 6 | ||||
-rw-r--r-- | drivers/staging/greybus/svc.c | 6 | ||||
-rw-r--r-- | drivers/staging/greybus/timesync.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index 491bdd720c0c..cebb76e7d55c 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -1091,7 +1091,7 @@ static ssize_t gb_camera_debugfs_read(struct file *file, char __user *buf, size_t len, loff_t *offset) { const struct gb_camera_debugfs_entry *op = file->private_data; - struct gb_camera *gcam = file->f_inode->i_private; + struct gb_camera *gcam = file_inode(file)->i_private; struct gb_camera_debugfs_buffer *buffer; ssize_t ret; @@ -1113,7 +1113,7 @@ static ssize_t gb_camera_debugfs_write(struct file *file, loff_t *offset) { const struct gb_camera_debugfs_entry *op = file->private_data; - struct gb_camera *gcam = file->f_inode->i_private; + struct gb_camera *gcam = file_inode(file)->i_private; ssize_t ret; char *kbuf; diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index baab460eeaa3..d367cdffaa10 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -1250,7 +1250,7 @@ static int apb_log_poll(void *data) static ssize_t apb_log_read(struct file *f, char __user *buf, size_t count, loff_t *ppos) { - struct es2_ap_dev *es2 = f->f_inode->i_private; + struct es2_ap_dev *es2 = file_inode(f)->i_private; ssize_t ret; size_t copied; char *tmp_buf; @@ -1304,7 +1304,7 @@ static void usb_log_disable(struct es2_ap_dev *es2) static ssize_t apb_log_enable_read(struct file *f, char __user *buf, size_t count, loff_t *ppos) { - struct es2_ap_dev *es2 = f->f_inode->i_private; + struct es2_ap_dev *es2 = file_inode(f)->i_private; int enable = !IS_ERR_OR_NULL(es2->apb_log_task); char tmp_buf[3]; @@ -1317,7 +1317,7 @@ static ssize_t apb_log_enable_write(struct file *f, const char __user *buf, { int enable; ssize_t retval; - struct es2_ap_dev *es2 = f->f_inode->i_private; + struct es2_ap_dev *es2 = file_inode(f)->i_private; retval = kstrtoint_from_user(buf, count, 10, &enable); if (retval) diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index 550055ec27a5..8779270cadc1 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -757,7 +757,7 @@ static int gb_svc_version_request(struct gb_operation *op) static ssize_t pwr_debugfs_voltage_read(struct file *file, char __user *buf, size_t len, loff_t *offset) { - struct svc_debugfs_pwrmon_rail *pwrmon_rails = file->f_inode->i_private; + struct svc_debugfs_pwrmon_rail *pwrmon_rails = file_inode(file)->i_private; struct gb_svc *svc = pwrmon_rails->svc; int ret, desc; u32 value; @@ -780,7 +780,7 @@ static ssize_t pwr_debugfs_voltage_read(struct file *file, char __user *buf, static ssize_t pwr_debugfs_current_read(struct file *file, char __user *buf, size_t len, loff_t *offset) { - struct svc_debugfs_pwrmon_rail *pwrmon_rails = file->f_inode->i_private; + struct svc_debugfs_pwrmon_rail *pwrmon_rails = file_inode(file)->i_private; struct gb_svc *svc = pwrmon_rails->svc; int ret, desc; u32 value; @@ -803,7 +803,7 @@ static ssize_t pwr_debugfs_current_read(struct file *file, char __user *buf, static ssize_t pwr_debugfs_power_read(struct file *file, char __user *buf, size_t len, loff_t *offset) { - struct svc_debugfs_pwrmon_rail *pwrmon_rails = file->f_inode->i_private; + struct svc_debugfs_pwrmon_rail *pwrmon_rails = file_inode(file)->i_private; struct gb_svc *svc = pwrmon_rails->svc; int ret, desc; u32 value; diff --git a/drivers/staging/greybus/timesync.c b/drivers/staging/greybus/timesync.c index 2e68af7dea6d..09ce00484b3f 100644 --- a/drivers/staging/greybus/timesync.c +++ b/drivers/staging/greybus/timesync.c @@ -921,7 +921,7 @@ EXPORT_SYMBOL_GPL(gb_timesync_schedule_asynchronous); static ssize_t gb_timesync_ping_read(struct file *file, char __user *ubuf, size_t len, loff_t *offset, bool ktime) { - struct gb_timesync_svc *timesync_svc = file->f_inode->i_private; + struct gb_timesync_svc *timesync_svc = file_inode(file)->i_private; char *buf; ssize_t ret = 0; |