musb_virthub: use HUB_CHAR_*
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sun, 18 Jan 2015 22:57:18 +0000 (01:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 13:02:32 +0000 (21:02 +0800)
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>
drivers/usb/musb/musb_virthub.c

index b072420e44f590e3388c3a1b641b18bf72061da9..b79e5be7aa97c9abed5e7a73793d820bb787751a 100644 (file)
@@ -349,9 +349,10 @@ int musb_hub_control(
                desc->bDescriptorType = 0x29;
                desc->bNbrPorts = 1;
                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->bHubContrCurrent = 0;