diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-09-20 07:36:45 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-23 21:15:13 +0200 |
commit | ed942bc08581b9c6fe6cba0ec8d7601e19d475a2 (patch) | |
tree | 58b6299c5b75ddd848dcfa9fb69ca584e4103f29 /drivers/base/bus.c | |
parent | 72b0a6503f8519980a4734bcdbb35a9ec6cd6347 (diff) | |
download | barebox-ed942bc08581b9c6fe6cba0ec8d7601e19d475a2.tar.gz barebox-ed942bc08581b9c6fe6cba0ec8d7601e19d475a2.tar.xz |
driver: search device and driver based on the bus instead of all
This will allow reduce the number of driver and device to search on.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index f80363d5a7..1dd139f7a3 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -28,6 +28,9 @@ int bus_register(struct bus_type *bus) if (get_bus_by_name(bus->name)) return -EEXIST; + INIT_LIST_HEAD(&bus->device_list); + INIT_LIST_HEAD(&bus->driver_list); + list_add_tail(&bus->list, &bus_list); return 0; |