usb: Update device class in usb device's descriptor
authorVivek Gautam <gautam.vivek@samsung.com>
Fri, 12 Apr 2013 11:04:36 +0000 (16:34 +0530)
committerMarek Vasut <marex@denx.de>
Sun, 5 May 2013 21:54:22 +0000 (23:54 +0200)
Fetch the device class into usb device's dwcriptors,
so that the host controller's driver can use this info
to differentiate between HUB and DEVICE.

Signed-off-by: Amar <amarendra.xt@samsung.com>
common/usb.c

index 8407974f773c69173354463ac24108a083bc5439..3a96a3423097fa059c2806df0fe3850e9c5326bf 100644 (file)
@@ -879,6 +879,11 @@ int usb_new_device(struct usb_device *dev)
        }
 
        dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0;
+       /*
+        * Fetch the device class, driver can use this info
+        * to differentiate between HUB and DEVICE.
+        */
+       dev->descriptor.bDeviceClass = desc->bDeviceClass;
 
        /* find the port number we're at */
        if (parent) {