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/gadget/atmel_usba_udc.c | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/usb/gadget/atmel_usba_udc.c')
-rw-r--r-- | drivers/usb/gadget/atmel_usba_udc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index a7aed84d98c9..fd49dba53613 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -93,7 +93,7 @@ static ssize_t queue_dbg_read(struct file *file, char __user *buf, | |||
93 | if (!access_ok(VERIFY_WRITE, buf, nbytes)) | 93 | if (!access_ok(VERIFY_WRITE, buf, nbytes)) |
94 | return -EFAULT; | 94 | return -EFAULT; |
95 | 95 | ||
96 | mutex_lock(&file->f_dentry->d_inode->i_mutex); | 96 | mutex_lock(&file_inode(file)->i_mutex); |
97 | list_for_each_entry_safe(req, tmp_req, queue, queue) { | 97 | list_for_each_entry_safe(req, tmp_req, queue, queue) { |
98 | len = snprintf(tmpbuf, sizeof(tmpbuf), | 98 | len = snprintf(tmpbuf, sizeof(tmpbuf), |
99 | "%8p %08x %c%c%c %5d %c%c%c\n", | 99 | "%8p %08x %c%c%c %5d %c%c%c\n", |
@@ -120,7 +120,7 @@ static ssize_t queue_dbg_read(struct file *file, char __user *buf, | |||
120 | nbytes -= len; | 120 | nbytes -= len; |
121 | buf += len; | 121 | buf += len; |
122 | } | 122 | } |
123 | mutex_unlock(&file->f_dentry->d_inode->i_mutex); | 123 | mutex_unlock(&file_inode(file)->i_mutex); |
124 | 124 | ||
125 | return actual; | 125 | return actual; |
126 | } | 126 | } |
@@ -168,13 +168,13 @@ out: | |||
168 | static ssize_t regs_dbg_read(struct file *file, char __user *buf, | 168 | static ssize_t regs_dbg_read(struct file *file, char __user *buf, |
169 | size_t nbytes, loff_t *ppos) | 169 | size_t nbytes, loff_t *ppos) |
170 | { | 170 | { |
171 | struct inode *inode = file->f_dentry->d_inode; | 171 | struct inode *inode = file_inode(file); |
172 | int ret; | 172 | int ret; |
173 | 173 | ||
174 | mutex_lock(&inode->i_mutex); | 174 | mutex_lock(&inode->i_mutex); |
175 | ret = simple_read_from_buffer(buf, nbytes, ppos, | 175 | ret = simple_read_from_buffer(buf, nbytes, ppos, |
176 | file->private_data, | 176 | file->private_data, |
177 | file->f_dentry->d_inode->i_size); | 177 | file_inode(file)->i_size); |
178 | mutex_unlock(&inode->i_mutex); | 178 | mutex_unlock(&inode->i_mutex); |
179 | 179 | ||
180 | return ret; | 180 | return ret; |