]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: Add an usb_device parameter to usb_reset_root_port
authorHans de Goede <hdegoede@redhat.com>
Wed, 17 Jun 2015 19:33:48 +0000 (21:33 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:48:56 +0000 (13:48 +0200)
Add an usb_device parameter to usb_reset_root_port so that it knows which
root-port it is resetting. This is necessary for proper device-model support
for usb_reset_root_port.

Also remove a duplicate declaration of usb_reset_root_port() from usb.h .

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

index d204ba26f59086f672eebd9255d10a74a963c1db..fbaf8ecbe232ce63170228727df1ed7fa23b060f 100644 (file)
@@ -924,7 +924,7 @@ static int usb_hub_port_reset(struct usb_device *dev, struct usb_device *hub)
                        return err;
                }
        } else {
-               usb_reset_root_port();
+               usb_reset_root_port(dev);
        }
 
        return 0;
index 18680c9d3beb352c1daea59c2a918c9109363d40..bce6cec1b5c9c28562b87ca769bac4291d1e3e68 100644 (file)
@@ -265,7 +265,7 @@ int usb_init(void)
        return usb_started ? 0 : -1;
 }
 
-int usb_reset_root_port(void)
+int usb_reset_root_port(struct usb_device *udev)
 {
        return -ENOSYS;
 }
index d1ee5f8d0651eac8532fcda026e3ce2cc64d5054..1bf676c589b2ee86b8d9fae997c58b18743f3080 100644 (file)
@@ -180,7 +180,7 @@ void *poll_int_queue(struct usb_device *dev, struct int_queue *queue)
        return NULL; /* URB still pending */
 }
 
-int usb_reset_root_port(void)
+int usb_reset_root_port(struct usb_device *dev)
 {
        void *mbase = host->mregs;
        u8 power;
@@ -232,7 +232,7 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
        if (get_timer(0) >= timeout)
                return -ENODEV;
 
-       usb_reset_root_port();
+       usb_reset_root_port(NULL);
        host->is_active = 1;
        hcd.hcd_priv = host;
 
index 8a71e2825334bcf5ebd4c06a7259dedbe6c2ee90..2bb6a063c6b82d2e90023da151cf8a72963bfc47 100644 (file)
@@ -175,9 +175,9 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller);
 int usb_lowlevel_stop(int index);
 
 #if defined(CONFIG_MUSB_HOST) || defined(CONFIG_DM_USB)
-int usb_reset_root_port(void);
+int usb_reset_root_port(struct usb_device *dev);
 #else
-#define usb_reset_root_port()
+#define usb_reset_root_port(dev)
 #endif
 
 int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
@@ -710,10 +710,6 @@ struct dm_usb_ops {
 #define usb_get_ops(dev)       ((struct dm_usb_ops *)(dev)->driver->ops)
 #define usb_get_emul_ops(dev)  ((struct dm_usb_ops *)(dev)->driver->ops)
 
-#ifdef CONFIG_MUSB_HOST
-int usb_reset_root_port(void);
-#endif
-
 /**
  * usb_get_dev_index() - look up a device index number
  *