summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-08 23:47:56 -0700
committerSimon Glass <sjg@chromium.org>2015-11-19 20:27:51 -0700
commit1b6a1dff71cd15b60823d924dd4623aeaadd3a2b (patch)
tree040392b8dfb6492149655ee4eb387fe8b19c3326 /drivers/usb
parentaf9c7c11e97ce99a8b8a0de99f91bde1b703377e (diff)
downloadu-boot-imx-1b6a1dff71cd15b60823d924dd4623aeaadd3a2b.zip
u-boot-imx-1b6a1dff71cd15b60823d924dd4623aeaadd3a2b.tar.gz
u-boot-imx-1b6a1dff71cd15b60823d924dd4623aeaadd3a2b.tar.bz2
Revert "dm: usb: Rename usb_find_child to usb_find_emul_child"
This reverts commit 9b510df703d282effba4f56ac567aa8011d56e6b. We want to avoid having the USB stack rely on unbind. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/usb-uclass.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 7f6a9a6..838d05a 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -494,14 +494,15 @@ error:
}
/**
- * usb_find_emul_child() - Find an existing device for emulated devices
+ * usb_find_child() - Find an existing device which matches our needs
+ *
+ *
*/
-static int usb_find_emul_child(struct udevice *parent,
- struct usb_device_descriptor *desc,
- struct usb_interface_descriptor *iface,
- struct udevice **devp)
+static int usb_find_child(struct udevice *parent,
+ struct usb_device_descriptor *desc,
+ struct usb_interface_descriptor *iface,
+ struct udevice **devp)
{
-#ifdef CONFIG_SANDBOX
struct udevice *dev;
*devp = NULL;
@@ -520,7 +521,7 @@ static int usb_find_emul_child(struct udevice *parent,
return 0;
}
}
-#endif
+
return -ENOENT;
}
@@ -580,8 +581,8 @@ int usb_scan_device(struct udevice *parent, int port,
debug("read_descriptor for '%s': ret=%d\n", parent->name, ret);
if (ret)
return ret;
- ret = usb_find_emul_child(parent, &udev->descriptor, iface, &dev);
- debug("** usb_find_emul_child returns %d\n", ret);
+ ret = usb_find_child(parent, &udev->descriptor, iface, &dev);
+ debug("** usb_find_child returns %d\n", ret);
if (ret) {
if (ret != -ENOENT)
return ret;