From eacd5e7cc3af3eb044f997d6bd3aa69c0ae7c772 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sun, 22 Sep 2013 14:41:24 +0200 Subject: 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 --- drivers/usb/core/usb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/usb/core/usb.c') 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 */ -- cgit v1.2.3