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>
This commit is contained in:

committed by
Greg Kroah-Hartman

父節點
d785404198
當前提交
5363de7530
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user