diff options
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r-- | drivers/usb/core/devio.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 38ae877c46e3..dbc3e143453a 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -157,30 +157,6 @@ static int connected(struct usb_dev_state *ps) | |||
157 | ps->dev->state != USB_STATE_NOTATTACHED); | 157 | ps->dev->state != USB_STATE_NOTATTACHED); |
158 | } | 158 | } |
159 | 159 | ||
160 | static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig) | ||
161 | { | ||
162 | loff_t ret; | ||
163 | |||
164 | mutex_lock(&file_inode(file)->i_mutex); | ||
165 | |||
166 | switch (orig) { | ||
167 | case 0: | ||
168 | file->f_pos = offset; | ||
169 | ret = file->f_pos; | ||
170 | break; | ||
171 | case 1: | ||
172 | file->f_pos += offset; | ||
173 | ret = file->f_pos; | ||
174 | break; | ||
175 | case 2: | ||
176 | default: | ||
177 | ret = -EINVAL; | ||
178 | } | ||
179 | |||
180 | mutex_unlock(&file_inode(file)->i_mutex); | ||
181 | return ret; | ||
182 | } | ||
183 | |||
184 | static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, | 160 | static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, |
185 | loff_t *ppos) | 161 | loff_t *ppos) |
186 | { | 162 | { |
@@ -2366,7 +2342,7 @@ static unsigned int usbdev_poll(struct file *file, | |||
2366 | 2342 | ||
2367 | const struct file_operations usbdev_file_operations = { | 2343 | const struct file_operations usbdev_file_operations = { |
2368 | .owner = THIS_MODULE, | 2344 | .owner = THIS_MODULE, |
2369 | .llseek = usbdev_lseek, | 2345 | .llseek = no_seek_end_llseek, |
2370 | .read = usbdev_read, | 2346 | .read = usbdev_read, |
2371 | .poll = usbdev_poll, | 2347 | .poll = usbdev_poll, |
2372 | .unlocked_ioctl = usbdev_ioctl, | 2348 | .unlocked_ioctl = usbdev_ioctl, |