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/usb/core | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/devices.c | 4 | ||||
-rw-r--r-- | drivers/usb/core/devio.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index cbacea933b18..2c42e06f9717 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c | |||
@@ -658,7 +658,7 @@ static loff_t usb_device_lseek(struct file *file, loff_t offset, int orig) | |||
658 | { | 658 | { |
659 | loff_t ret; | 659 | loff_t ret; |
660 | 660 | ||
661 | mutex_lock(&file->f_dentry->d_inode->i_mutex); | 661 | mutex_lock(&file_inode(file)->i_mutex); |
662 | 662 | ||
663 | switch (orig) { | 663 | switch (orig) { |
664 | case 0: | 664 | case 0: |
@@ -674,7 +674,7 @@ static loff_t usb_device_lseek(struct file *file, loff_t offset, int orig) | |||
674 | ret = -EINVAL; | 674 | ret = -EINVAL; |
675 | } | 675 | } |
676 | 676 | ||
677 | mutex_unlock(&file->f_dentry->d_inode->i_mutex); | 677 | mutex_unlock(&file_inode(file)->i_mutex); |
678 | return ret; | 678 | return ret; |
679 | } | 679 | } |
680 | 680 | ||
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index b78fbe222b72..6e8af6ddb5f7 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -160,7 +160,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig) | |||
160 | { | 160 | { |
161 | loff_t ret; | 161 | loff_t ret; |
162 | 162 | ||
163 | mutex_lock(&file->f_dentry->d_inode->i_mutex); | 163 | mutex_lock(&file_inode(file)->i_mutex); |
164 | 164 | ||
165 | switch (orig) { | 165 | switch (orig) { |
166 | case 0: | 166 | case 0: |
@@ -176,7 +176,7 @@ static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig) | |||
176 | ret = -EINVAL; | 176 | ret = -EINVAL; |
177 | } | 177 | } |
178 | 178 | ||
179 | mutex_unlock(&file->f_dentry->d_inode->i_mutex); | 179 | mutex_unlock(&file_inode(file)->i_mutex); |
180 | return ret; | 180 | return ret; |
181 | } | 181 | } |
182 | 182 | ||
@@ -1970,7 +1970,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd, | |||
1970 | void __user *p) | 1970 | void __user *p) |
1971 | { | 1971 | { |
1972 | struct dev_state *ps = file->private_data; | 1972 | struct dev_state *ps = file->private_data; |
1973 | struct inode *inode = file->f_path.dentry->d_inode; | 1973 | struct inode *inode = file_inode(file); |
1974 | struct usb_device *dev = ps->dev; | 1974 | struct usb_device *dev = ps->dev; |
1975 | int ret = -ENOTTY; | 1975 | int ret = -ENOTTY; |
1976 | 1976 | ||