summaryrefslogtreecommitdiff
path: root/drivers/usb/host/usb-uclass.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-07 18:08:01 -0500
committerTom Rini <trini@konsulko.com>2022-12-07 18:08:01 -0500
commit2b2e9127ccdacdd1170dfcd2a4f1794ff9446fb1 (patch)
treec43505efa6b8a29f4382024c6ef606e9a9d34d94 /drivers/usb/host/usb-uclass.c
parentb071de98433c9bcc5a44e005a7c7b7cda1333bb9 (diff)
parente524f3a449f58e2ef967fb9b64b01db3d099a27a (diff)
Merge branch '2022-12-07-Kconfig-migrations' into next
- Import another batch of Kconfig migrations and in this case, also legacy code removal.
Diffstat (limited to 'drivers/usb/host/usb-uclass.c')
-rw-r--r--drivers/usb/host/usb-uclass.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 060f3441df0..956e2a4e8e4 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -346,49 +346,6 @@ 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;
- struct udevice *dev;
-
- if (!device_active(parent))
- return NULL;
- udev = dev_get_parent_priv(parent);
- if (udev->devnum == devnum)
- return udev;
-
- for (device_find_first_child(parent, &dev);
- dev;
- device_find_next_child(&dev)) {
- udev = find_child_devnum(dev, devnum);
- if (udev)
- return udev;
- }
-
- return NULL;
-}
-
-struct usb_device *usb_get_dev_index(struct udevice *bus, int index)
-{
- struct udevice *dev;
- int devnum = index + 1; /* Addresses are allocated from 1 on USB */
-
- device_find_first_child(bus, &dev);
- if (!dev)
- return NULL;
-
- return find_child_devnum(dev, devnum);
-}
-#endif
-
int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp)
{
struct usb_plat *plat;