diff options
Diffstat (limited to 'drivers/usb/host/uhci-debug.c')
-rw-r--r-- | drivers/usb/host/uhci-debug.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index 1b28a000d5c6..9c6635d43db0 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c | |||
@@ -584,27 +584,8 @@ static int uhci_debug_open(struct inode *inode, struct file *file) | |||
584 | 584 | ||
585 | static loff_t uhci_debug_lseek(struct file *file, loff_t off, int whence) | 585 | static loff_t uhci_debug_lseek(struct file *file, loff_t off, int whence) |
586 | { | 586 | { |
587 | struct uhci_debug *up; | 587 | struct uhci_debug *up = file->private_data; |
588 | loff_t new = -1; | 588 | return no_seek_end_llseek_size(file, off, whence, up->size); |
589 | |||
590 | up = file->private_data; | ||
591 | |||
592 | /* | ||
593 | * XXX: atomic 64bit seek access, but that needs to be fixed in the VFS | ||
594 | */ | ||
595 | switch (whence) { | ||
596 | case 0: | ||
597 | new = off; | ||
598 | break; | ||
599 | case 1: | ||
600 | new = file->f_pos + off; | ||
601 | break; | ||
602 | } | ||
603 | |||
604 | if (new < 0 || new > up->size) | ||
605 | return -EINVAL; | ||
606 | |||
607 | return (file->f_pos = new); | ||
608 | } | 589 | } |
609 | 590 | ||
610 | static ssize_t uhci_debug_read(struct file *file, char __user *buf, | 591 | static ssize_t uhci_debug_read(struct file *file, char __user *buf, |