]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: usb: Do not assume that first child is always a hub
authorHans de Goede <hdegoede@redhat.com>
Wed, 17 Jun 2015 19:33:53 +0000 (21:33 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:48:57 +0000 (13:48 +0200)
commit93a474518e4a0cee259b8a382e7dcd34a6ba7526
tree21d8500c52c1465706e4e00214eb9f15e1480333
parent980c5fd58773632a45ad890e2c0de2fd3a76ff59
dm: usb: Do not assume that first child is always a hub

On some single port (otg) controllers there is no emulated root hub, so
the first child (if any) may be one of: UCLASS_MASS_STORAGE,
UCLASS_USB_DEV_GENERIC or UCLASS_USB_HUB.

All three of these (and in the future others) are suitable for our
purposes, remove the check for the device being a hub, and add a check to
deal with the fact that there may be no child-dev.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
common/cmd_usb.c
drivers/usb/host/usb-uclass.c