VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / usb / host / uhci-debug.c
index 86e4c3a..a0721d0 100644 (file)
@@ -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)