diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-22 14:41:24 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-24 18:38:22 +0200 |
commit | eacd5e7cc3af3eb044f997d6bd3aa69c0ae7c772 (patch) | |
tree | 30a848dec72fde92fdcacdb767062475bcae9e02 /drivers/usb/core/usb.c | |
parent | 78182d5d4f8532ab1018c99a7271005d9bb1bad2 (diff) | |
download | barebox-eacd5e7cc3af3eb044f997d6bd3aa69c0ae7c772.tar.gz barebox-eacd5e7cc3af3eb044f997d6bd3aa69c0ae7c772.tar.xz |
usb: make usb devices children of the corresponding host
To be able to find usb devices in the hardware tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 36fc736fd0..a7dbe2afa9 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -440,6 +440,8 @@ static int usb_new_device(struct usb_device *dev) dev->dev.id = DEVICE_ID_SINGLE; + if (dev->host->hw_dev) + dev->dev.parent = dev->host->hw_dev; register_device(&dev->dev); /* now prode if the device is a hub */ |