diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 17:07:38 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:31 -0500 |
commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /drivers/pnp | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/isapnp/proc.c | 4 | ||||
-rw-r--r-- | drivers/pnp/pnpbios/proc.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c index 315b3112aca8..65f735ac6b3b 100644 --- a/drivers/pnp/isapnp/proc.c +++ b/drivers/pnp/isapnp/proc.c | |||
@@ -30,7 +30,7 @@ static struct proc_dir_entry *isapnp_proc_bus_dir = NULL; | |||
30 | static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) | 30 | static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) |
31 | { | 31 | { |
32 | loff_t new = -1; | 32 | loff_t new = -1; |
33 | struct inode *inode = file->f_path.dentry->d_inode; | 33 | struct inode *inode = file_inode(file); |
34 | 34 | ||
35 | mutex_lock(&inode->i_mutex); | 35 | mutex_lock(&inode->i_mutex); |
36 | switch (whence) { | 36 | switch (whence) { |
@@ -55,7 +55,7 @@ static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) | |||
55 | static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, | 55 | static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, |
56 | size_t nbytes, loff_t * ppos) | 56 | size_t nbytes, loff_t * ppos) |
57 | { | 57 | { |
58 | struct inode *ino = file->f_path.dentry->d_inode; | 58 | struct inode *ino = file_inode(file); |
59 | struct proc_dir_entry *dp = PDE(ino); | 59 | struct proc_dir_entry *dp = PDE(ino); |
60 | struct pnp_dev *dev = dp->data; | 60 | struct pnp_dev *dev = dp->data; |
61 | int pos = *ppos; | 61 | int pos = *ppos; |
diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c index bc89f392a629..63ddb0173456 100644 --- a/drivers/pnp/pnpbios/proc.c +++ b/drivers/pnp/pnpbios/proc.c | |||
@@ -244,7 +244,7 @@ static int pnpbios_proc_open(struct inode *inode, struct file *file) | |||
244 | static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf, | 244 | static ssize_t pnpbios_proc_write(struct file *file, const char __user *buf, |
245 | size_t count, loff_t *pos) | 245 | size_t count, loff_t *pos) |
246 | { | 246 | { |
247 | void *data = PDE(file->f_path.dentry->d_inode)->data; | 247 | void *data = PDE(file_inode(file))->data; |
248 | struct pnp_bios_node *node; | 248 | struct pnp_bios_node *node; |
249 | int boot = (long)data >> 8; | 249 | int boot = (long)data >> 8; |
250 | u8 nodenum = (long)data; | 250 | u8 nodenum = (long)data; |