From: Sergei Shtylyov Date: Sun, 18 Jan 2015 22:34:59 +0000 (+0300) Subject: isp1362-hcd: use HUB_CHAR_* X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=662fc2a6a3d0720b3e4f00fec22ee214cd1204c3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git isp1362-hcd: 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, avoid duplicate computation when calling DBG(). Signed-off-by: Sergei Shtylyov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c index 75e5876f9d7c..b32ab60cad1e 100644 --- a/drivers/usb/host/isp1362-hcd.c +++ b/drivers/usb/host/isp1362-hcd.c @@ -1543,8 +1543,12 @@ static void isp1362_hub_descriptor(struct isp1362_hcd *isp1362_hcd, desc->bHubContrCurrent = 0; desc->bNbrPorts = reg & 0x3; /* Power switching, device type, overcurrent. */ - desc->wHubCharacteristics = cpu_to_le16((reg >> 8) & 0x1f); - DBG(0, "%s: hubcharacteristics = %02x\n", __func__, cpu_to_le16((reg >> 8) & 0x1f)); + desc->wHubCharacteristics = cpu_to_le16((reg >> 8) & + (HUB_CHAR_LPSM | + HUB_CHAR_COMPOUND | + HUB_CHAR_OCPM)); + DBG(0, "%s: hubcharacteristics = %02x\n", __func__, + desc->wHubCharacteristics); desc->bPwrOn2PwrGood = (reg >> 24) & 0xff; /* ports removable, and legacy PortPwrCtrlMask */ desc->u.hs.DeviceRemovable[0] = desc->bNbrPorts == 1 ? 1 << 1 : 3 << 1;