Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3c4140d authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman
Browse files

isp116x-hcd: use HUB_CHAR_*



Fix  using the  bare number  to set the 'wHubCharacteristics' field of the Hub
Descriptor while the values are #define'd in <linux/usb/ch11.h>.

Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4fbdb336
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -948,7 +948,10 @@ static void isp116x_hub_descriptor(struct isp116x *isp116x,
	desc->bHubContrCurrent = 0;
	desc->bNbrPorts = (u8) (reg & 0x3);
	/* Power switching, device type, overcurrent. */
	desc->wHubCharacteristics = cpu_to_le16((u16) ((reg >> 8) & 0x1f));
	desc->wHubCharacteristics = cpu_to_le16((u16) ((reg >> 8) &
						       (HUB_CHAR_LPSM |
							HUB_CHAR_COMPOUND |
							HUB_CHAR_OCPM)));
	desc->bPwrOn2PwrGood = (u8) ((reg >> 24) & 0xff);
	/* ports removable, and legacy PortPwrCtrlMask */
	desc->u.hs.DeviceRemovable[0] = 0;