[U-Boot] [PATCH] dm: usb: Do not use bus->seq before device_probe(bus)
Simon Glass
sjg at chromium.org
Mon May 4 21:37:18 CEST 2015
Hi Hans,
On 4 May 2015 at 13:33, Hans de Goede <hdegoede at redhat.com> wrote:
> Do not use bus->seq before device_probe(bus), as bus->seq is not set until
> after the device_probe() call. This fixes u-boot printing: "USB-1: " for
> each bus it scans.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> drivers/usb/host/usb-uclass.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
> index 3655435..dd721cb 100644
> --- a/drivers/usb/host/usb-uclass.c
> +++ b/drivers/usb/host/usb-uclass.c
> @@ -181,9 +181,8 @@ int usb_init(void)
>
> uclass_foreach_dev(bus, uc) {
> /* init low_level USB */
> + printf("USB%d: ", count);
This might be confusing if bus->seq ends up being something else. But
I don't have a better idea and I've been thinking about it for a
while.
Acked-by: Simon Glass <sjg at chromium.org>
> count++;
> - printf("USB");
> - printf("%d: ", bus->seq);
> ret = device_probe(bus);
> if (ret == -ENODEV) { /* No such device. */
> puts("Port not available.\n");
> --
> 2.3.6
>
Regards,
Simon
More information about the U-Boot
mailing list