dwc2: hcd: use USB_DT_HUB
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sat, 28 Mar 2015 22:36:28 +0000 (01:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Apr 2015 17:03:16 +0000 (19:03 +0200)
Fix  using the  bare number to set the 'bDescriptorType' field of the Hub
Descriptor while the value  is #define'd in <linux/usb/ch11.h>.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/hcd.c

index 559b55e5debb02e84c76434ba03af649b99ca410..6f4acfa9252e9c3372d1a0d21f829b51130b10ca 100644 (file)
@@ -1616,7 +1616,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
                dev_dbg(hsotg->dev, "GetHubDescriptor\n");
                hub_desc = (struct usb_hub_descriptor *)buf;
                hub_desc->bDescLength = 9;
-               hub_desc->bDescriptorType = 0x29;
+               hub_desc->bDescriptorType = USB_DT_HUB;
                hub_desc->bNbrPorts = 1;
                hub_desc->wHubCharacteristics =
                        cpu_to_le16(HUB_CHAR_COMMON_LPSM |