From: Sergei Shtylyov Date: Sun, 18 Jan 2015 22:41:37 +0000 (+0300) Subject: ohci-hub: use HUB_CHAR_* X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=db42a4c9a053e12f408fa13d5475180f33a4bc0b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ohci-hub: use HUB_CHAR_* Fix using the bare numbers to set the 'wHubCharacteristics' field of the Hub Descriptor while the values are #define'd in . While at it, fix the indentation. Signed-off-by: Sergei Shtylyov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 0aa17c937115..fe2aedd8a54d 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c @@ -544,15 +544,15 @@ ohci_hub_descriptor ( temp = 1 + (ohci->num_ports / 8); desc->bDescLength = 7 + 2 * temp; - temp = 0; + temp = HUB_CHAR_COMMON_LPSM | HUB_CHAR_COMMON_OCPM; if (rh & RH_A_NPS) /* no power switching? */ - temp |= 0x0002; + temp |= HUB_CHAR_NO_LPSM; if (rh & RH_A_PSM) /* per-port power switching? */ - temp |= 0x0001; + temp |= HUB_CHAR_INDV_PORT_LPSM; if (rh & RH_A_NOCP) /* no overcurrent reporting? */ - temp |= 0x0010; + temp |= HUB_CHAR_NO_OCPM; else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */ - temp |= 0x0008; + temp |= HUB_CHAR_INDV_PORT_OCPM; desc->wHubCharacteristics = cpu_to_le16(temp); /* ports removable, and usb 1.0 legacy PortPwrCtrlMask */