remove "#if 0" from find_bus function, export it.
PATCH 7/7 remove "#if 0" from find_bus function, export it.
This function were placed in "#if 0" because nobody was using it. We using it now.
See http://lwn.net/Articles/210610/
Signed-off-by Anton Vorontsov <[email protected]>
--- drivers/base/bus.c | 5 ++--- include/linux/device.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/base/bus.c +2 -3
@@ -667,14 +667,13 @@ void put_bus(struct bus_type * bus)* * Note that kset_find_obj increments bus' reference count. */ -#if 0 +struct bus_type *find_bus (char * name) {struct kobject * k =kset_find_obj (&bus_subsys.kset, name);return k ?to_bus (k) :NULL ; } -#endif /* 0 */ - +EXPORT_SYMBOL_GPL (find_bus);/** * bus_add_attrs - Add default attributes for this bus.
include/linux/device.h +2 -0
@@ -68,6 +68,8 @@ extern void bus_unregister(struct bus_type * bus);extern int __must_check bus_rescan_devices (struct bus_type * bus); +extern struct bus_type *find_bus (char *name); +/* iterator helpers for buses */ int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data,
Signature · 1 line
1.5.1.1-dirty