[PATCH 04/10] USB: fix PowerPowerCtrlMask assignment

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Wed Jul 23 06:51:45 PDT 2014


usb_hub_configure() gets the hub descriptor and copies its values
over to a local descriptor.

While copying PortPowerCtrlMask it erroneously overwrites
DeviceRemovable due to a copy-and-paste error. Fix it up.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
---
To: Sascha Hauer <s.hauer at pengutronix.de>
Cc: barebox at lists.infradead.org
---
 drivers/usb/core/hub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index f90a927eef66..7553bcdd5ef3 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -342,7 +342,7 @@ static int usb_hub_configure(struct usb_device *dev)
 		hub->desc.DeviceRemovable[i] = descriptor->DeviceRemovable[i];
 
 	for (i = 0; i < ((hub->desc.bNbrPorts + 1 + 7)/8); i++)
-		hub->desc.DeviceRemovable[i] = descriptor->PortPowerCtrlMask[i];
+		hub->desc.PortPowerCtrlMask[i] = descriptor->PortPowerCtrlMask[i];
 
 	dev->maxchild = descriptor->bNbrPorts;
 	dev_dbg(&dev->dev, "%d ports detected\n", dev->maxchild);
-- 
2.0.0




More information about the barebox mailing list