diff options
author | Yuanhan Liu <yliu.null@gmail.com> | 2012-10-06 15:23:17 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-24 14:40:50 -0700 |
commit | 30b1e495b81321f572020a2f5266ece3ed1a6ecd (patch) | |
tree | d872d1aa3a13a893c3a2ca4dfe5c25159741ebe9 /drivers/usb/core/usb.c | |
parent | 60d80adbac9b7492439b1d0665353bc2117b4d78 (diff) | |
download | blackbird-op-linux-30b1e495b81321f572020a2f5266ece3ed1a6ecd.tar.gz blackbird-op-linux-30b1e495b81321f572020a2f5266ece3ed1a6ecd.zip |
USB: use bus_to_hdc instead of container_of
We defined bus_to_hdc for that, use it.
Signed-off-by: Yuanhan Liu <yliu.null@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index cd8fb44a3e16..7d3de09a82e4 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -370,14 +370,14 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port1) { struct usb_device *dev; - struct usb_hcd *usb_hcd = container_of(bus, struct usb_hcd, self); + struct usb_hcd *usb_hcd = bus_to_hcd(bus); unsigned root_hub = 0; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) return NULL; - if (!usb_get_hcd(bus_to_hcd(bus))) { + if (!usb_get_hcd(usb_hcd)) { kfree(dev); return NULL; } |