summaryrefslogtreecommitdiff
path: root/drivers/usb/host/r8a66597-hcd.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2016-01-25 20:30:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-03 13:26:30 -0800
commit5363de75307e333d89df7531f9dd8310d973ecdb (patch)
tree5c90ec1dbcf6d1626984ec6306db7d73ee8dd3ab /drivers/usb/host/r8a66597-hcd.c
parentd78540419866887345cec480016b0f87f6a5aca2 (diff)
usb: core: switch bus numbering to using idr
USB bus numbering is based on directly dealing with bitmaps and defines a separate list of busses. This can be simplified and unified by using existing idr functionality. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/r8a66597-hcd.c')
-rw-r--r--drivers/usb/host/r8a66597-hcd.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 4cbd0633c5c2..1ef887361ac0 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -2099,13 +2099,8 @@ static void r8a66597_check_detect_child(struct r8a66597 *r8a66597,
memset(now_map, 0, sizeof(now_map));
- list_for_each_entry(bus, &usb_bus_list, bus_list) {
- if (!bus->root_hub)
- continue;
-
- if (bus->busnum != hcd->self.busnum)
- continue;
-
+ bus = idr_find(&usb_bus_idr, hcd->self.busnum);
+ if (bus && bus->root_hub) {
collect_usb_address_map(bus->root_hub, now_map);
update_usb_address_map(r8a66597, bus->root_hub, now_map);
}