aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/bus.c3
-rw-r--r--drivers/base/class.c2
-rw-r--r--include/linux/kobject.h13
3 files changed, 3 insertions, 15 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index ff850d1b0d92..625f7e694521 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -823,7 +823,8 @@ int bus_register(struct bus_type * bus)
823 if (retval) 823 if (retval)
824 goto out; 824 goto out;
825 825
826 subsys_set_kset(bus, bus_subsys); 826 bus->subsys.kobj.kset = &bus_subsys;
827
827 retval = subsystem_register(&bus->subsys); 828 retval = subsystem_register(&bus->subsys);
828 if (retval) 829 if (retval)
829 goto out; 830 goto out;
diff --git a/drivers/base/class.c b/drivers/base/class.c
index ecd6336bffea..cf9cf666f472 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -149,7 +149,7 @@ int class_register(struct class * cls)
149 if (error) 149 if (error)
150 return error; 150 return error;
151 151
152 subsys_set_kset(cls, class_subsys); 152 cls->subsys.kobj.kset = &class_subsys;
153 153
154 error = subsystem_register(&cls->subsys); 154 error = subsystem_register(&cls->subsys);
155 if (!error) { 155 if (!error) {
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 626bdd3c3dd9..0713799fde29 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -241,19 +241,6 @@ extern struct kset hypervisor_subsys;
241#define kset_set_kset_s(obj,subsys) \ 241#define kset_set_kset_s(obj,subsys) \
242 (obj)->kset.kobj.kset = &(subsys) 242 (obj)->kset.kobj.kset = &(subsys)
243 243
244/**
245 * subsys_set_kset(obj,subsys) - set kset for subsystem
246 * @obj: ptr to some object type.
247 * @_subsys: a subsystem object (not a ptr).
248 *
249 * Can be used for any object type with an embedded ->subsys.
250 * Sets the kset of @obj's kobject to @subsys.kset. This makes
251 * the object a member of that kset.
252 */
253
254#define subsys_set_kset(obj,_subsys) \
255 (obj)->subsys.kobj.kset = &(_subsys)
256
257extern void subsystem_init(struct kset *); 244extern void subsystem_init(struct kset *);
258extern int __must_check subsystem_register(struct kset *); 245extern int __must_check subsystem_register(struct kset *);
259extern void subsystem_unregister(struct kset *); 246extern void subsystem_unregister(struct kset *);