Re: [PATCH 17/23] uhci-hub: use HUB_CHAR_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 01/19/2015 07:41 PM, Alan Stern wrote:

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: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>

---
  drivers/usb/host/uhci-hub.c |    5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

Index: usb/drivers/usb/host/uhci-hub.c
===================================================================
--- usb.orig/drivers/usb/host/uhci-hub.c
+++ usb/drivers/usb/host/uhci-hub.c
@@ -17,8 +17,9 @@ static const __u8 root_hub_hub_des[] =
  	0x09,			/*  __u8  bLength; */
  	0x29,			/*  __u8  bDescriptorType; Hub-descriptor */
  	0x02,			/*  __u8  bNbrPorts; */
-	0x0a,			/* __u16  wHubCharacteristics; */
-	0x00,			/*   (per-port OC, no power switching) */
+	HUB_CHAR_NO_LPSM |	/* __u16  wHubCharacteristics; */
+	HUB_CHAR_INDV_PORT_OCPM, /* (per-port OC, no power switching) */

I'd prefer to see the second line indented more, even if it means the

   Done, indented with extra TAB.

comment has to spill over to a third line.

   Didn't have to, the comment fitted just right. :-)

+	0x00,
  	0x01,			/*  __u8  bPwrOn2pwrGood; 2ms */
  	0x00,			/*  __u8  bHubContrCurrent; 0 mA */
  	0x00,			/*  __u8  DeviceRemovable; *** 7 Ports max */

Alan Stern

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux