From: Bin Meng Date: Sun, 1 Oct 2017 06:19:44 -0700 Subject: [U-Boot] [PATCH 09/10] dm: usb: emul: Drop usb_emul_reset() In-Reply-To: <1506863985-30907-1-git-send-email-bmeng.cn@gmail.com> References: <1506863985-30907-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1506863985-30907-9-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- drivers/usb/emul/usb-emul-uclass.c | 8 -------- drivers/usb/host/usb-uclass.c | 11 ----------- include/usb.h | 8 -------- 3 files changed, 27 deletions(-) diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c index 359d0da..fbe11f3 100644 --- a/drivers/usb/emul/usb-emul-uclass.c +++ b/drivers/usb/emul/usb-emul-uclass.c @@ -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", diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index bfc0556..4e40f4b 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -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 diff --git a/include/usb.h b/include/usb.h index 3766514..57a7d8d 100644 --- a/include/usb.h +++ b/include/usb.h @@ -1067,14 +1067,6 @@ 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 * * This shows a list of active USB devices along with basic information about -- 2.7.4