staging: octeon-usb: fix endianness bug
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 29 Jun 2014 19:52:56 +0000 (22:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 23:39:22 +0000 (16:39 -0700)
wHubCharacteristics gets wrong value on big-endian CPUs.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/octeon-usb/octeon-hcd.c

index a65b708b804adb4b1c532f738104fbd4181a5e23..095cc146eefc55491f49eb16daaeeb808def3f55 100644 (file)
@@ -3628,7 +3628,7 @@ static int octeon_usb_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                desc->bDescLength = 9;
                desc->bDescriptorType = 0x29;
                desc->bNbrPorts = 1;
-               desc->wHubCharacteristics = 0x08;
+               desc->wHubCharacteristics = cpu_to_le16(0x08);
                desc->bPwrOn2PwrGood = 1;
                desc->bHubContrCurrent = 0;
                desc->u.hs.DeviceRemovable[0] = 0;