Commit d6b05b84edf590ff872de6310ec20d60b5b37dd2

Authored by Greg Kroah-Hartman
1 parent 6a8d8abb6e

Driver core: remove subsys_set_kset

This macro is only used by the driver core and is held over from when we
had subsystems.  It is not needed anymore.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 3 changed files with 3 additions and 15 deletions Side-by-side Diff

... ... @@ -823,7 +823,8 @@
823 823 if (retval)
824 824 goto out;
825 825  
826   - subsys_set_kset(bus, bus_subsys);
  826 + bus->subsys.kobj.kset = &bus_subsys;
  827 +
827 828 retval = subsystem_register(&bus->subsys);
828 829 if (retval)
829 830 goto out;
drivers/base/class.c
... ... @@ -149,7 +149,7 @@
149 149 if (error)
150 150 return error;
151 151  
152   - subsys_set_kset(cls, class_subsys);
  152 + cls->subsys.kobj.kset = &class_subsys;
153 153  
154 154 error = subsystem_register(&cls->subsys);
155 155 if (!error) {
include/linux/kobject.h
... ... @@ -241,19 +241,6 @@
241 241 #define kset_set_kset_s(obj,subsys) \
242 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   -
257 244 extern void subsystem_init(struct kset *);
258 245 extern int __must_check subsystem_register(struct kset *);
259 246 extern void subsystem_unregister(struct kset *);