diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-05-05 11:54:33 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-05 20:58:41 -0600 |
commit | 25c8ebdfcd9b2fca08ccf6bcc37de9ba388ad458 (patch) | |
tree | 455e64c266f166da4ccbdf7d06d2be4b350c936e /drivers/usb/host | |
parent | 7f1a07538f71b2b0f37744bdc899be294e0518b5 (diff) | |
download | u-boot-imx-25c8ebdfcd9b2fca08ccf6bcc37de9ba388ad458.zip u-boot-imx-25c8ebdfcd9b2fca08ccf6bcc37de9ba388ad458.tar.gz u-boot-imx-25c8ebdfcd9b2fca08ccf6bcc37de9ba388ad458.tar.bz2 |
dm: usb: Use usb_get_bus in dm ehci code
Use usb_get_bus in dm ehci code rather then re-implementing it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index bd9861d..85adbf4 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -125,14 +125,7 @@ static struct descriptor { static struct ehci_ctrl *ehci_get_ctrl(struct usb_device *udev) { #ifdef CONFIG_DM_USB - struct udevice *dev; - - /* Find the USB controller */ - for (dev = udev->dev; - device_get_uclass_id(dev) != UCLASS_USB; - dev = dev->parent) - ; - return dev_get_priv(dev); + return dev_get_priv(usb_get_bus(udev->dev)); #else return udev->controller; #endif |