Sfoglia il codice sorgente

usb: Update device class in usb device's descriptor

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>
Vivek Gautam 12 anni fa
parent
commit
99c3491b78
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      common/usb.c

+ 5 - 0
common/usb.c

@@ -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) {