From 000f2a4d8cfc1e1cbc0aa98136015e7ae7719b46 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 2 Nov 2007 13:47:53 +0100 Subject: Driver Core: kill subsys_attribute and default sysfs ops Remove the no longer needed subsys_attributes, they are all converted to the more sensical kobj_attributes. There is no longer a magic fallback in sysfs attribute operations, all kobjects which create simple attributes need explicitely a ktype assigned, which tells the core what was intended here. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman --- lib/kobject.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'lib/kobject.c') diff --git a/lib/kobject.c b/lib/kobject.c index 99f6354a575..c742ac25228 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -810,26 +810,6 @@ void subsystem_unregister(struct kset *s) kset_unregister(s); } -/** - * subsystem_create_file - export sysfs attribute file. - * @s: subsystem. - * @a: subsystem attribute descriptor. - */ - -int subsys_create_file(struct kset *s, struct subsys_attribute *a) -{ - int error = 0; - - if (!s || !a) - return -EINVAL; - - if (kset_get(s)) { - error = sysfs_create_file(&s->kobj, &a->attr); - kset_put(s); - } - return error; -} - static void kset_release(struct kobject *kobj) { struct kset *kset = container_of(kobj, struct kset, kobj); @@ -927,4 +907,3 @@ EXPORT_SYMBOL(kset_unregister); EXPORT_SYMBOL(subsystem_register); EXPORT_SYMBOL(subsystem_unregister); -EXPORT_SYMBOL(subsys_create_file); -- cgit v1.2.3-70-g09d2