浏览代码

musb_virthub: use HUB_CHAR_*

Fix  using the  bare numbers to set the 'wHubCharacteristics' field of the Hub
Descriptor while the values are #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>
Sergei Shtylyov 10 年之前
父节点
当前提交
211f25dc9d
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      drivers/usb/musb/musb_virthub.c

+ 4 - 3
drivers/usb/musb/musb_virthub.c

@@ -349,9 +349,10 @@ int musb_hub_control(
 		desc->bDescriptorType = 0x29;
 		desc->bDescriptorType = 0x29;
 		desc->bNbrPorts = 1;
 		desc->bNbrPorts = 1;
 		desc->wHubCharacteristics = cpu_to_le16(
 		desc->wHubCharacteristics = cpu_to_le16(
-				  0x0001	/* per-port power switching */
-				| 0x0010	/* no overcurrent reporting */
-				);
+			  HUB_CHAR_INDV_PORT_LPSM /* per-port power switching */
+
+			| HUB_CHAR_NO_OCPM	/* no overcurrent reporting */
+			);
 		desc->bPwrOn2PwrGood = 5;	/* msec/2 */
 		desc->bPwrOn2PwrGood = 5;	/* msec/2 */
 		desc->bHubContrCurrent = 0;
 		desc->bHubContrCurrent = 0;