Skip to content

Commit

Permalink
Driver core: remove subsys_get()
Browse files Browse the repository at this point in the history
There are no more subsystems, it's a kset now so remove the function and
the only two users, which are in the driver core.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
gregkh committed Oct 12, 2007
1 parent 6e9d930 commit 1ef4cfa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion drivers/base/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ EXPORT_SYMBOL_GPL(device_reprobe);

struct bus_type *get_bus(struct bus_type *bus)
{
return bus ? container_of(subsys_get(&bus->subsys),
return bus ? container_of(kset_get(&bus->subsys),
struct bus_type, subsys) : NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void class_remove_file(struct class * cls, const struct class_attribute * attr)
static struct class *class_get(struct class *cls)
{
if (cls)
return container_of(subsys_get(&cls->subsys), struct class, subsys);
return container_of(kset_get(&cls->subsys), struct class, subsys);
return NULL;
}

Expand Down
7 changes: 0 additions & 7 deletions include/linux/kobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,6 @@ extern void subsystem_init(struct kset *);
extern int __must_check subsystem_register(struct kset *);
extern void subsystem_unregister(struct kset *);

static inline struct kset *subsys_get(struct kset *s)
{
if (s)
return kset_get(s);
return NULL;
}

struct subsys_attribute {
struct attribute attr;
ssize_t (*show)(struct kset *, char *);
Expand Down
2 changes: 1 addition & 1 deletion lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ int subsys_create_file(struct kset *s, struct subsys_attribute *a)
if (!s || !a)
return -EINVAL;

if (subsys_get(s)) {
if (kset_get(s)) {
error = sysfs_create_file(&s->kobj, &a->attr);
kset_put(s);
}
Expand Down

0 comments on commit 1ef4cfa

Please sign in to comment.