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:
Heiner Kallweit
2016-01-25 20:30:30 +01:00
committed by Greg Kroah-Hartman
父節點 d785404198
當前提交 5363de7530
共有 7 個文件被更改,包括 15 次插入35 次删除

查看文件

@@ -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);
}