summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-08 23:47:59 -0700
committerSimon Glass <sjg@chromium.org>2015-11-19 20:27:52 -0700
commite8ea5e8c8568c8cbb752e524e8eb74f776f5e262 (patch)
treebd6f8656470f4b8e0322b2bd63e2cd124c9c52d9 /drivers
parent79725ca4f6d583e4c677f694b89c839ed7b07b8f (diff)
downloadblackbird-obmc-uboot-e8ea5e8c8568c8cbb752e524e8eb74f776f5e262.tar.gz
blackbird-obmc-uboot-e8ea5e8c8568c8cbb752e524e8eb74f776f5e262.zip
dm: usb: Deprecate usb_get_dev_index()
This function should not be used with driver model. While there are users of USB Ethernet that use driver model for USB but not Ethernet, we have to keep it around. Add a comment to that effect. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/usb-uclass.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 89611f1c32..4aa92f8ee7 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -279,6 +279,14 @@ int usb_init(void)
return usb_started ? 0 : -1;
}
+/*
+ * TODO(sjg@chromium.org): Remove this legacy function. At present it is needed
+ * to support boards which use driver model for USB but not Ethernet, and want
+ * to use USB Ethernet.
+ *
+ * The #if clause is here to ensure that remains the only case.
+ */
+#if !defined(CONFIG_DM_ETH) && defined(CONFIG_USB_HOST_ETHER)
static struct usb_device *find_child_devnum(struct udevice *parent, int devnum)
{
struct usb_device *udev;
@@ -312,6 +320,7 @@ struct usb_device *usb_get_dev_index(struct udevice *bus, int index)
return find_child_devnum(dev, devnum);
}
+#endif
int usb_post_bind(struct udevice *dev)
{
OpenPOWER on IntegriCloud