diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-11-02 08:47:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:18 -0500 |
commit | 386f275f5d097758f867bc99ddeaeb7a03b6b190 (patch) | |
tree | bd27130e78e1aad1ce080f8c8ca76b9166b33ed4 /lib | |
parent | 23b5212cc7422f475b82124334b64277b5b43013 (diff) |
Driver Core: switch all dynamic ksets to kobj_sysfs_ops
Switch all dynamically created ksets, that export simple attributes,
to kobj_attribute from subsys_attribute. Struct subsys_attribute will
be removed.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mike Halcrow <mhalcrow@us.ibm.com>
Cc: Phillip Hellewell <phillip@hellewell.homeip.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index 1c343fe4ba63..99f6354a5751 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -626,7 +626,8 @@ static void dynamic_kobj_release(struct kobject *kobj) | |||
626 | } | 626 | } |
627 | 627 | ||
628 | static struct kobj_type dynamic_kobj_ktype = { | 628 | static struct kobj_type dynamic_kobj_ktype = { |
629 | .release = dynamic_kobj_release, | 629 | .release = dynamic_kobj_release, |
630 | .sysfs_ops = &kobj_sysfs_ops, | ||
630 | }; | 631 | }; |
631 | 632 | ||
632 | /** | 633 | /** |
@@ -836,7 +837,8 @@ static void kset_release(struct kobject *kobj) | |||
836 | kfree(kset); | 837 | kfree(kset); |
837 | } | 838 | } |
838 | 839 | ||
839 | static struct kobj_type kset_type = { | 840 | static struct kobj_type kset_ktype = { |
841 | .sysfs_ops = &kobj_sysfs_ops, | ||
840 | .release = kset_release, | 842 | .release = kset_release, |
841 | }; | 843 | }; |
842 | 844 | ||
@@ -869,11 +871,11 @@ static struct kset *kset_create(const char *name, | |||
869 | kset->kobj.parent = parent_kobj; | 871 | kset->kobj.parent = parent_kobj; |
870 | 872 | ||
871 | /* | 873 | /* |
872 | * The kobject of this kset will have a type of kset_type and belong to | 874 | * The kobject of this kset will have a type of kset_ktype and belong to |
873 | * no kset itself. That way we can properly free it when it is | 875 | * no kset itself. That way we can properly free it when it is |
874 | * finished being used. | 876 | * finished being used. |
875 | */ | 877 | */ |
876 | kset->kobj.ktype = &kset_type; | 878 | kset->kobj.ktype = &kset_ktype; |
877 | kset->kobj.kset = NULL; | 879 | kset->kobj.kset = NULL; |
878 | 880 | ||
879 | return kset; | 881 | return kset; |