aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-10-30 00:22:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:14 -0500
commit59a548338ac6c9d7549c54278d0f724088585928 (patch)
tree36d12d6d2d9b32584a06032b45a0009dd7210db5 /drivers/base
parentbd35b93d8049ab47b5bfaf6b10ba39badf21d1c3 (diff)
kset: convert drivers/base/bus.c to use kset_create
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/bus.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 630956037e18..e3b101077804 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -166,7 +166,7 @@ static struct kset_uevent_ops bus_uevent_ops = {
166 .filter = bus_uevent_filter, 166 .filter = bus_uevent_filter,
167}; 167};
168 168
169static decl_subsys(bus, &bus_uevent_ops); 169static struct kset *bus_kset;
170 170
171 171
172#ifdef CONFIG_HOTPLUG 172#ifdef CONFIG_HOTPLUG
@@ -767,7 +767,7 @@ EXPORT_SYMBOL_GPL(device_reprobe);
767#if 0 767#if 0
768struct bus_type * find_bus(char * name) 768struct bus_type * find_bus(char * name)
769{ 769{
770 struct kobject * k = kset_find_obj(&bus_subsys.kset, name); 770 struct kobject * k = kset_find_obj(bus_kset, name);
771 return k ? to_bus(k) : NULL; 771 return k ? to_bus(k) : NULL;
772} 772}
773#endif /* 0 */ 773#endif /* 0 */
@@ -851,7 +851,7 @@ int bus_register(struct bus_type * bus)
851 if (retval) 851 if (retval)
852 goto out; 852 goto out;
853 853
854 bus->subsys.kobj.kset = &bus_subsys; 854 bus->subsys.kobj.kset = bus_kset;
855 bus->subsys.kobj.ktype = &bus_ktype; 855 bus->subsys.kobj.ktype = &bus_ktype;
856 856
857 retval = subsystem_register(&bus->subsys); 857 retval = subsystem_register(&bus->subsys);
@@ -935,7 +935,10 @@ EXPORT_SYMBOL_GPL(bus_unregister_notifier);
935 935
936int __init buses_init(void) 936int __init buses_init(void)
937{ 937{
938 return subsystem_register(&bus_subsys); 938 bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
939 if (!bus_kset)
940 return -ENOMEM;
941 return 0;
939} 942}
940 943
941 944