[PATCH] USB: optimise devio.c usbdev_read fix
authorAndrew Morton <akpm@osdl.org>
Thu, 19 Jan 2006 07:55:07 +0000 (23:55 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Mar 2006 22:49:52 +0000 (14:49 -0800)
drivers/usb/core/devio.c: In function `usbdev_read':
drivers/usb/core/devio.c:140: error: invalid type argument of `->'
drivers/usb/core/devio.c:141: error: invalid type argument of `->'
drivers/usb/core/devio.c:142: error: invalid type argument of `->'
drivers/usb/core/devio.c:143: error: invalid type argument of `->'

Cc: Oliver Neukum <oliver@neukum.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c

index d01bd77e7b1479028086a98a09997378840366ee..de6a7c07cf970364aea88ad1417031c30d861ba6 100644 (file)
@@ -137,10 +137,10 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes, l
                struct usb_device_descriptor temp_desc ; /* 18 bytes - fits on the stack */
 
                memcpy(&temp_desc, &dev->descriptor, sizeof(dev->descriptor));
-               le16_to_cpus(&temp_desc->bcdUSB);
-               le16_to_cpus(&temp_desc->idVendor);
-               le16_to_cpus(&temp_desc->idProduct);
-               le16_to_cpus(&temp_desc->bcdDevice);
+               le16_to_cpus(&temp_desc.bcdUSB);
+               le16_to_cpus(&temp_desc.idVendor);
+               le16_to_cpus(&temp_desc.idProduct);
+               le16_to_cpus(&temp_desc.bcdDevice);
 
                len = sizeof(struct usb_device_descriptor) - pos;
                if (len > nbytes)