diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-06-17 21:33:55 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:37 -0600 |
commit | e740ca3cab93a8cb31d870bffecd6aa8eadf44e1 (patch) | |
tree | ea2ff40689e9dc7e1dd73c5eecd7365229ee3e0e /drivers/usb/musb-new/musb_host.c | |
parent | 15837236386191f2a26706b5ee56cdb4ab28e6d5 (diff) | |
download | talos-obmc-uboot-e740ca3cab93a8cb31d870bffecd6aa8eadf44e1.tar.gz talos-obmc-uboot-e740ca3cab93a8cb31d870bffecd6aa8eadf44e1.zip |
musb: Update usb-compat to work with struct usb_device without a parent ptr
When building with CONFIG_DM_USB=y struct usb_device does not have a parent
pointer. This commit adds support to the musb code to deal with this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/usb/musb-new/musb_host.c')
-rw-r--r-- | drivers/usb/musb-new/musb_host.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/musb-new/musb_host.c b/drivers/usb/musb-new/musb_host.c index 437309ceb4..40b9c66af8 100644 --- a/drivers/usb/musb-new/musb_host.c +++ b/drivers/usb/musb-new/musb_host.c @@ -2067,7 +2067,11 @@ int musb_urb_enqueue( /* precompute addressing for external hub/tt ports */ if (musb->is_multipoint) { +#ifndef __UBOOT__ struct usb_device *parent = urb->dev->parent; +#else + struct usb_device *parent = usb_dev_get_parent(urb->dev); +#endif #ifndef __UBOOT__ if (parent != hcd->self.root_hub) { |