aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/bus.c2
-rw-r--r--drivers/base/class.c2
-rw-r--r--include/linux/kobject.h7
-rw-r--r--lib/kobject.c2
4 files changed, 3 insertions, 10 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 2f775936544b..bc38085dbb10 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -728,7 +728,7 @@ EXPORT_SYMBOL_GPL(device_reprobe);
728 728
729struct bus_type *get_bus(struct bus_type *bus) 729struct bus_type *get_bus(struct bus_type *bus)
730{ 730{
731 return bus ? container_of(subsys_get(&bus->subsys), 731 return bus ? container_of(kset_get(&bus->subsys),
732 struct bus_type, subsys) : NULL; 732 struct bus_type, subsys) : NULL;
733} 733}
734 734
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 50e34132576c..3e9b04c30fb9 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -93,7 +93,7 @@ void class_remove_file(struct class * cls, const struct class_attribute * attr)
93static struct class *class_get(struct class *cls) 93static struct class *class_get(struct class *cls)
94{ 94{
95 if (cls) 95 if (cls)
96 return container_of(subsys_get(&cls->subsys), struct class, subsys); 96 return container_of(kset_get(&cls->subsys), struct class, subsys);
97 return NULL; 97 return NULL;
98} 98}
99 99
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 45effedff315..c0fb535d7acd 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -231,13 +231,6 @@ extern void subsystem_init(struct kset *);
231extern int __must_check subsystem_register(struct kset *); 231extern int __must_check subsystem_register(struct kset *);
232extern void subsystem_unregister(struct kset *); 232extern void subsystem_unregister(struct kset *);
233 233
234static inline struct kset *subsys_get(struct kset *s)
235{
236 if (s)
237 return kset_get(s);
238 return NULL;
239}
240
241struct subsys_attribute { 234struct subsys_attribute {
242 struct attribute attr; 235 struct attribute attr;
243 ssize_t (*show)(struct kset *, char *); 236 ssize_t (*show)(struct kset *, char *);
diff --git a/lib/kobject.c b/lib/kobject.c
index 0aa4e906916a..1326041213dd 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -679,7 +679,7 @@ int subsys_create_file(struct kset *s, struct subsys_attribute *a)
679 if (!s || !a) 679 if (!s || !a)
680 return -EINVAL; 680 return -EINVAL;
681 681
682 if (subsys_get(s)) { 682 if (kset_get(s)) {
683 error = sysfs_create_file(&s->kobj, &a->attr); 683 error = sysfs_create_file(&s->kobj, &a->attr);
684 kset_put(s); 684 kset_put(s);
685 } 685 }