提交 a5dd0395 编写于 作者: S Sergei Shtylyov 提交者: Greg Kroah-Hartman

dwc2: hcd: use USB_DT_HUB

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: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 2569ffd5
...@@ -1616,7 +1616,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, ...@@ -1616,7 +1616,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
dev_dbg(hsotg->dev, "GetHubDescriptor\n"); dev_dbg(hsotg->dev, "GetHubDescriptor\n");
hub_desc = (struct usb_hub_descriptor *)buf; hub_desc = (struct usb_hub_descriptor *)buf;
hub_desc->bDescLength = 9; hub_desc->bDescLength = 9;
hub_desc->bDescriptorType = 0x29; hub_desc->bDescriptorType = USB_DT_HUB;
hub_desc->bNbrPorts = 1; hub_desc->bNbrPorts = 1;
hub_desc->wHubCharacteristics = hub_desc->wHubCharacteristics =
cpu_to_le16(HUB_CHAR_COMMON_LPSM | cpu_to_le16(HUB_CHAR_COMMON_LPSM |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册