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.hesselba...@gmail.com>
---
To: Sascha Hauer <s.ha...@pengutronix.de>
Cc: barebox@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to