summaryrefslogtreecommitdiff
path: root/common/usb_hub.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-05 17:10:10 -0600
committerSimon Glass <sjg@chromium.org>2016-07-27 14:15:54 -0600
commit911954859d6dece49c3e4835faea004cfe392506 (patch)
tree79431b5419e1366009f331a3d1a604b64f14ccff /common/usb_hub.c
parent2e3f1ff63f50f36e74d46f939823241856ebf1bd (diff)
downloadu-boot-imx-911954859d6dece49c3e4835faea004cfe392506.zip
u-boot-imx-911954859d6dece49c3e4835faea004cfe392506.tar.gz
u-boot-imx-911954859d6dece49c3e4835faea004cfe392506.tar.bz2
dm: Use dm_scan_fdt_dev() directly where possible
Quite a few places have a bind() method which just calls dm_scan_fdt_dev(). We may as well call dm_scan_fdt_dev() directly. Update the code to do this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/usb_hub.c')
-rw-r--r--common/usb_hub.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 26ee13e..ff9cd50 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -754,12 +754,6 @@ int usb_hub_scan(struct udevice *hub)
return usb_hub_configure(udev);
}
-static int usb_hub_post_bind(struct udevice *dev)
-{
- /* Scan the bus for devices */
- return dm_scan_fdt_dev(dev);
-}
-
static int usb_hub_post_probe(struct udevice *dev)
{
debug("%s\n", __func__);
@@ -781,7 +775,7 @@ U_BOOT_DRIVER(usb_generic_hub) = {
UCLASS_DRIVER(usb_hub) = {
.id = UCLASS_USB_HUB,
.name = "usb_hub",
- .post_bind = usb_hub_post_bind,
+ .post_bind = dm_scan_fdt_dev,
.post_probe = usb_hub_post_probe,
.child_pre_probe = usb_child_pre_probe,
.per_child_auto_alloc_size = sizeof(struct usb_device),