Patchwork [U-Boot] USB: Fix device stati for removable and powerctrl (typo)

login
register
mail settings
Submitter Alexander Holler
Date Jan. 27, 2011, 9:50 p.m.
Message ID <1296165007-19041-1-git-send-email-holler@ahsoftware.de>
Download mbox | patch
Permalink /patch/80745/
State Accepted
Commit cb44091fdfa1170f9c0a0a1d3396d6472fbf8911
Delegated to: Remy Bohmer
Headers show

Comments

Alexander Holler - Jan. 27, 2011, 9:50 p.m.
I currently don't know if the error could have other consequences
than a wrong output when turning debug on.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
---
 common/usb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Remy Bohmer - Jan. 28, 2011, 8:07 p.m.
Hi,

2011/1/27 Alexander Holler <holler@ahsoftware.de>:
> I currently don't know if the error could have other consequences
> than a wrong output when turning debug on.
>
> Signed-off-by: Alexander Holler <holler@ahsoftware.de>
> ---
>  common/usb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/common/usb.c b/common/usb.c
> index 10e23de..aa28de0 100644
> --- a/common/usb.c
> +++ b/common/usb.c
> @@ -1220,7 +1220,7 @@ 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;
>        USB_HUB_PRINTF("%d ports detected\n", dev->maxchild);
> --

Applied to u-boot-usb. Thanks.

Remy

Patch

diff --git a/common/usb.c b/common/usb.c
index 10e23de..aa28de0 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -1220,7 +1220,7 @@  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;
 	USB_HUB_PRINTF("%d ports detected\n", dev->maxchild);