X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fusb%2Fhost%2Fuhci-debug.c;h=a0721d06059eb48d6bc61cd006348f3190f0b076;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=86e4c3a11e06527155f608ce10650441094d1944;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index 86e4c3a11..a0721d060 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c @@ -248,7 +248,7 @@ static int uhci_show_sc(int port, unsigned short status, char *buf, int len) static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len) { char *out = buf; - unsigned int io_addr = uhci->io_addr; + unsigned long io_addr = uhci->io_addr; unsigned short usbcmd, usbstat, usbint, usbfrnum; unsigned int flbaseadd; unsigned char sof; @@ -571,22 +571,7 @@ static ssize_t uhci_proc_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) { struct uhci_proc *up = file->private_data; - unsigned int pos; - unsigned int size; - - pos = *ppos; - size = up->size; - if (pos >= size) - return 0; - if (nbytes > size - pos) - nbytes = size - pos; - - if (copy_to_user(buf, up->data + pos, nbytes)) - return -EFAULT; - - *ppos += nbytes; - - return nbytes; + return simple_read_from_buffer(buf, nbytes, ppos, up->data, up->size); } static int uhci_proc_release(struct inode *inode, struct file *file)