dm: usb: emul: Drop usb_emul_reset()
authorBin Meng <bmeng.cn@gmail.com>
Sun, 1 Oct 2017 13:19:44 +0000 (06:19 -0700)
committerMarek Vasut <marex@denx.de>
Sun, 1 Oct 2017 14:32:51 +0000 (16:32 +0200)
With the root hub unbinding in usb_stop(), there is no need to do
a Sandbox-specific reset operation. usb_emul_reset() is no longer
used anywhere, drop it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/usb/emul/usb-emul-uclass.c
drivers/usb/host/usb-uclass.c
include/usb.h

index 359d0da07e604f14c26333229f6fa024250991cc..fbe11f3135372ec259b33eb0ea26597a696a9507 100644 (file)
@@ -294,14 +294,6 @@ int usb_emul_setup_device(struct udevice *dev, struct usb_string *strings,
        return 0;
 }
 
-void usb_emul_reset(struct udevice *dev)
-{
-       struct usb_dev_platdata *plat = dev_get_parent_platdata(dev);
-
-       plat->devnum = 0;
-       plat->configno = 0;
-}
-
 UCLASS_DRIVER(usb_emul) = {
        .id             = UCLASS_USB_EMUL,
        .name           = "usb_emul",
index bfc0556d7d660a6215475356848340db63c65350..4e40f4bc3d2caf2d8803e1d0b4a2484fb3bec881 100644 (file)
@@ -194,17 +194,6 @@ int usb_stop(void)
                }
        }
 
-#ifdef CONFIG_SANDBOX
-       struct udevice *dev;
-
-       /* Reset all enulation devices */
-       ret = uclass_get(UCLASS_USB_EMUL, &uc);
-       if (ret)
-               return ret;
-
-       uclass_foreach_dev(dev, uc)
-               usb_emul_reset(dev);
-#endif
 #ifdef CONFIG_USB_STORAGE
        usb_stor_reset();
 #endif
index 37665146359af52e52083a872ba71f17f6741be7..57a7d8d0ea3bd12d737c901909607df8b0ecd2f1 100644 (file)
@@ -1066,14 +1066,6 @@ int usb_emul_find_for_dev(struct udevice *dev, struct udevice **emulp);
 struct usb_generic_descriptor **usb_emul_find_descriptor(
                struct usb_generic_descriptor **ptr, int type, int index);
 
-/**
- * usb_emul_reset() - Reset all emulators ready for use
- *
- * Clear out any address information in the emulators and make then ready for
- * a new USB scan
- */
-void usb_emul_reset(struct udevice *dev);
-
 /**
  * usb_show_tree() - show the USB device tree
  *