diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-06 13:36:58 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:24 -0500 |
commit | 0ff21e46630abce11fdaaffabd72bbd4eed5ac2c (patch) | |
tree | cc49671622ef90775bf12a91d20b8286aa346e6f /kernel/ksysfs.c | |
parent | 5c03c7ab886859eb195440dbb6ccb8c30c4e84cc (diff) |
kobject: convert kernel_kset to be a kobject
kernel_kset does not need to be a kset, but a much simpler kobject now
that we have kobj_attributes.
We also rename kernel_kset to kernel_kobj to catch all users of this
symbol with a build error instead of an easy-to-ignore build warning.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/ksysfs.c')
-rw-r--r-- | kernel/ksysfs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index 45e646585605..1081aff5fb9e 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c | |||
@@ -101,8 +101,8 @@ static struct bin_attribute notes_attr = { | |||
101 | .read = ¬es_read, | 101 | .read = ¬es_read, |
102 | }; | 102 | }; |
103 | 103 | ||
104 | struct kset *kernel_kset; | 104 | struct kobject *kernel_kobj; |
105 | EXPORT_SYMBOL_GPL(kernel_kset); | 105 | EXPORT_SYMBOL_GPL(kernel_kobj); |
106 | 106 | ||
107 | static struct attribute * kernel_attrs[] = { | 107 | static struct attribute * kernel_attrs[] = { |
108 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) | 108 | #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) |
@@ -125,18 +125,18 @@ static int __init ksysfs_init(void) | |||
125 | { | 125 | { |
126 | int error; | 126 | int error; |
127 | 127 | ||
128 | kernel_kset = kset_create_and_add("kernel", NULL, NULL); | 128 | kernel_kobj = kobject_create_and_add("kernel", NULL); |
129 | if (!kernel_kset) { | 129 | if (!kernel_kobj) { |
130 | error = -ENOMEM; | 130 | error = -ENOMEM; |
131 | goto exit; | 131 | goto exit; |
132 | } | 132 | } |
133 | error = sysfs_create_group(&kernel_kset->kobj, &kernel_attr_group); | 133 | error = sysfs_create_group(kernel_kobj, &kernel_attr_group); |
134 | if (error) | 134 | if (error) |
135 | goto kset_exit; | 135 | goto kset_exit; |
136 | 136 | ||
137 | if (notes_size > 0) { | 137 | if (notes_size > 0) { |
138 | notes_attr.size = notes_size; | 138 | notes_attr.size = notes_size; |
139 | error = sysfs_create_bin_file(&kernel_kset->kobj, ¬es_attr); | 139 | error = sysfs_create_bin_file(kernel_kobj, ¬es_attr); |
140 | if (error) | 140 | if (error) |
141 | goto group_exit; | 141 | goto group_exit; |
142 | } | 142 | } |
@@ -150,11 +150,11 @@ static int __init ksysfs_init(void) | |||
150 | 150 | ||
151 | notes_exit: | 151 | notes_exit: |
152 | if (notes_size > 0) | 152 | if (notes_size > 0) |
153 | sysfs_remove_bin_file(&kernel_kset->kobj, ¬es_attr); | 153 | sysfs_remove_bin_file(kernel_kobj, ¬es_attr); |
154 | group_exit: | 154 | group_exit: |
155 | sysfs_remove_group(&kernel_kset->kobj, &kernel_attr_group); | 155 | sysfs_remove_group(kernel_kobj, &kernel_attr_group); |
156 | kset_exit: | 156 | kset_exit: |
157 | kset_unregister(kernel_kset); | 157 | kobject_unregister(kernel_kobj); |
158 | exit: | 158 | exit: |
159 | return error; | 159 | return error; |
160 | } | 160 | } |