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 /arch/cris | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/arch-v10/drivers/sync_serial.c | 8 | ||||
-rw-r--r-- | arch/cris/arch-v32/drivers/cryptocop.c | 3 | ||||
-rw-r--r-- | arch/cris/arch-v32/drivers/sync_serial.c | 8 |
3 files changed, 9 insertions, 10 deletions
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c index c4b71710fb0e..a1c498d18d31 100644 --- a/arch/cris/arch-v10/drivers/sync_serial.c +++ b/arch/cris/arch-v10/drivers/sync_serial.c | |||
@@ -654,7 +654,7 @@ static int sync_serial_release(struct inode *inode, struct file *file) | |||
654 | 654 | ||
655 | static unsigned int sync_serial_poll(struct file *file, poll_table *wait) | 655 | static unsigned int sync_serial_poll(struct file *file, poll_table *wait) |
656 | { | 656 | { |
657 | int dev = MINOR(file->f_dentry->d_inode->i_rdev); | 657 | int dev = MINOR(file_inode(file)->i_rdev); |
658 | unsigned int mask = 0; | 658 | unsigned int mask = 0; |
659 | struct sync_port *port; | 659 | struct sync_port *port; |
660 | DEBUGPOLL(static unsigned int prev_mask = 0); | 660 | DEBUGPOLL(static unsigned int prev_mask = 0); |
@@ -685,7 +685,7 @@ static int sync_serial_ioctl_unlocked(struct file *file, | |||
685 | int return_val = 0; | 685 | int return_val = 0; |
686 | unsigned long flags; | 686 | unsigned long flags; |
687 | 687 | ||
688 | int dev = MINOR(file->f_dentry->d_inode->i_rdev); | 688 | int dev = MINOR(file_inode(file)->i_rdev); |
689 | struct sync_port *port; | 689 | struct sync_port *port; |
690 | 690 | ||
691 | if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) { | 691 | if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) { |
@@ -973,7 +973,7 @@ static long sync_serial_ioctl(struct file *file, | |||
973 | static ssize_t sync_serial_write(struct file *file, const char *buf, | 973 | static ssize_t sync_serial_write(struct file *file, const char *buf, |
974 | size_t count, loff_t *ppos) | 974 | size_t count, loff_t *ppos) |
975 | { | 975 | { |
976 | int dev = MINOR(file->f_dentry->d_inode->i_rdev); | 976 | int dev = MINOR(file_inode(file)->i_rdev); |
977 | DECLARE_WAITQUEUE(wait, current); | 977 | DECLARE_WAITQUEUE(wait, current); |
978 | struct sync_port *port; | 978 | struct sync_port *port; |
979 | unsigned long flags; | 979 | unsigned long flags; |
@@ -1097,7 +1097,7 @@ static ssize_t sync_serial_write(struct file *file, const char *buf, | |||
1097 | static ssize_t sync_serial_read(struct file *file, char *buf, | 1097 | static ssize_t sync_serial_read(struct file *file, char *buf, |
1098 | size_t count, loff_t *ppos) | 1098 | size_t count, loff_t *ppos) |
1099 | { | 1099 | { |
1100 | int dev = MINOR(file->f_dentry->d_inode->i_rdev); | 1100 | int dev = MINOR(file_inode(file)->i_rdev); |
1101 | int avail; | 1101 | int avail; |
1102 | struct sync_port *port; | 1102 | struct sync_port *port; |
1103 | unsigned char *start; | 1103 | unsigned char *start; |
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index f8476d9e856b..877da1908234 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c | |||
@@ -3135,11 +3135,10 @@ static long cryptocop_ioctl_unlocked(struct inode *inode, | |||
3135 | static long | 3135 | static long |
3136 | cryptocop_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 3136 | cryptocop_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
3137 | { | 3137 | { |
3138 | struct inode *inode = file->f_path.dentry->d_inode; | ||
3139 | long ret; | 3138 | long ret; |
3140 | 3139 | ||
3141 | mutex_lock(&cryptocop_mutex); | 3140 | mutex_lock(&cryptocop_mutex); |
3142 | ret = cryptocop_ioctl_unlocked(inode, filp, cmd, arg); | 3141 | ret = cryptocop_ioctl_unlocked(file_inode(filp), filp, cmd, arg); |
3143 | mutex_unlock(&cryptocop_mutex); | 3142 | mutex_unlock(&cryptocop_mutex); |
3144 | 3143 | ||
3145 | return ret; | 3144 | return ret; |
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index a6a180bc566f..219f704e3221 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c | |||
@@ -609,7 +609,7 @@ static int sync_serial_release(struct inode *inode, struct file *file) | |||
609 | 609 | ||
610 | static unsigned int sync_serial_poll(struct file *file, poll_table *wait) | 610 | static unsigned int sync_serial_poll(struct file *file, poll_table *wait) |
611 | { | 611 | { |
612 | int dev = iminor(file->f_path.dentry->d_inode); | 612 | int dev = iminor(file_inode(file)); |
613 | unsigned int mask = 0; | 613 | unsigned int mask = 0; |
614 | sync_port *port; | 614 | sync_port *port; |
615 | DEBUGPOLL( static unsigned int prev_mask = 0; ); | 615 | DEBUGPOLL( static unsigned int prev_mask = 0; ); |
@@ -657,7 +657,7 @@ static int sync_serial_ioctl(struct file *file, | |||
657 | { | 657 | { |
658 | int return_val = 0; | 658 | int return_val = 0; |
659 | int dma_w_size = regk_dma_set_w_size1; | 659 | int dma_w_size = regk_dma_set_w_size1; |
660 | int dev = iminor(file->f_path.dentry->d_inode); | 660 | int dev = iminor(file_inode(file)); |
661 | sync_port *port; | 661 | sync_port *port; |
662 | reg_sser_rw_tr_cfg tr_cfg; | 662 | reg_sser_rw_tr_cfg tr_cfg; |
663 | reg_sser_rw_rec_cfg rec_cfg; | 663 | reg_sser_rw_rec_cfg rec_cfg; |
@@ -979,7 +979,7 @@ static long sync_serial_ioctl(struct file *file, | |||
979 | static ssize_t sync_serial_write(struct file *file, const char *buf, | 979 | static ssize_t sync_serial_write(struct file *file, const char *buf, |
980 | size_t count, loff_t *ppos) | 980 | size_t count, loff_t *ppos) |
981 | { | 981 | { |
982 | int dev = iminor(file->f_path.dentry->d_inode); | 982 | int dev = iminor(file_inode(file)); |
983 | DECLARE_WAITQUEUE(wait, current); | 983 | DECLARE_WAITQUEUE(wait, current); |
984 | struct sync_port *port; | 984 | struct sync_port *port; |
985 | int trunc_count; | 985 | int trunc_count; |
@@ -1102,7 +1102,7 @@ static ssize_t sync_serial_write(struct file *file, const char *buf, | |||
1102 | static ssize_t sync_serial_read(struct file * file, char * buf, | 1102 | static ssize_t sync_serial_read(struct file * file, char * buf, |
1103 | size_t count, loff_t *ppos) | 1103 | size_t count, loff_t *ppos) |
1104 | { | 1104 | { |
1105 | int dev = iminor(file->f_path.dentry->d_inode); | 1105 | int dev = iminor(file_inode(file)); |
1106 | int avail; | 1106 | int avail; |
1107 | sync_port *port; | 1107 | sync_port *port; |
1108 | unsigned char* start; | 1108 | unsigned char* start; |