diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 21:04:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 21:04:48 -0400 |
commit | 5b339915762d30b21995aa7263e74081f2f1110a (patch) | |
tree | 4e076dbd27025054b21dddd78a1cb3fef3de34d7 /include | |
parent | 89661adaaee2f85116b399e642129ccd4dafd195 (diff) | |
parent | 823bccfc4002296ba88c3ad0f049e1abd8108d30 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
remove "struct subsystem" as it is no longer needed
sysfs: printk format warning
DOC: Fix wrong identifier name in Documentation/driver-model/devres.txt
platform: reorder platform_device_del
Driver core: fix show_uevent from taking up way too much stack
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acpi_bus.h | 2 | ||||
-rw-r--r-- | include/linux/device.h | 8 | ||||
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/linux/kobject.h | 58 | ||||
-rw-r--r-- | include/linux/module.h | 2 | ||||
-rw-r--r-- | include/linux/pci_hotplug.h | 2 |
6 files changed, 33 insertions, 41 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 0d9f984a60a1..16c3c441256e 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -316,7 +316,7 @@ struct acpi_bus_event { | |||
316 | u32 data; | 316 | u32 data; |
317 | }; | 317 | }; |
318 | 318 | ||
319 | extern struct subsystem acpi_subsys; | 319 | extern struct kset acpi_subsys; |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * External Functions | 322 | * External Functions |
diff --git a/include/linux/device.h b/include/linux/device.h index ff83b61d283d..6579068134d1 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -53,7 +53,7 @@ struct bus_type { | |||
53 | const char * name; | 53 | const char * name; |
54 | struct module * owner; | 54 | struct module * owner; |
55 | 55 | ||
56 | struct subsystem subsys; | 56 | struct kset subsys; |
57 | struct kset drivers; | 57 | struct kset drivers; |
58 | struct kset devices; | 58 | struct kset devices; |
59 | struct klist klist_devices; | 59 | struct klist klist_devices; |
@@ -178,7 +178,7 @@ struct class { | |||
178 | const char * name; | 178 | const char * name; |
179 | struct module * owner; | 179 | struct module * owner; |
180 | 180 | ||
181 | struct subsystem subsys; | 181 | struct kset subsys; |
182 | struct list_head children; | 182 | struct list_head children; |
183 | struct list_head devices; | 183 | struct list_head devices; |
184 | struct list_head interfaces; | 184 | struct list_head interfaces; |
@@ -558,8 +558,8 @@ extern void device_shutdown(void); | |||
558 | 558 | ||
559 | 559 | ||
560 | /* drivers/base/firmware.c */ | 560 | /* drivers/base/firmware.c */ |
561 | extern int __must_check firmware_register(struct subsystem *); | 561 | extern int __must_check firmware_register(struct kset *); |
562 | extern void firmware_unregister(struct subsystem *); | 562 | extern void firmware_unregister(struct kset *); |
563 | 563 | ||
564 | /* debugging and troubleshooting/diagnostic helpers. */ | 564 | /* debugging and troubleshooting/diagnostic helpers. */ |
565 | extern const char *dev_driver_string(struct device *dev); | 565 | extern const char *dev_driver_string(struct device *dev); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 095a9c9a64fb..7c0077f06e24 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1416,7 +1416,7 @@ extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, | |||
1416 | extern int vfs_statfs(struct dentry *, struct kstatfs *); | 1416 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
1417 | 1417 | ||
1418 | /* /sys/fs */ | 1418 | /* /sys/fs */ |
1419 | extern struct subsystem fs_subsys; | 1419 | extern struct kset fs_subsys; |
1420 | 1420 | ||
1421 | #define FLOCK_VERIFY_READ 1 | 1421 | #define FLOCK_VERIFY_READ 1 |
1422 | #define FLOCK_VERIFY_WRITE 2 | 1422 | #define FLOCK_VERIFY_WRITE 2 |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index eb0e63ef297f..c288e41ba331 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -124,7 +124,6 @@ struct kset_uevent_ops { | |||
124 | }; | 124 | }; |
125 | 125 | ||
126 | struct kset { | 126 | struct kset { |
127 | struct subsystem * subsys; | ||
128 | struct kobj_type * ktype; | 127 | struct kobj_type * ktype; |
129 | struct list_head list; | 128 | struct list_head list; |
130 | spinlock_t list_lock; | 129 | spinlock_t list_lock; |
@@ -171,32 +170,23 @@ extern struct kobject * kset_find_obj(struct kset *, const char *); | |||
171 | #define set_kset_name(str) .kset = { .kobj = { .name = str } } | 170 | #define set_kset_name(str) .kset = { .kobj = { .name = str } } |
172 | 171 | ||
173 | 172 | ||
174 | |||
175 | struct subsystem { | ||
176 | struct kset kset; | ||
177 | }; | ||
178 | |||
179 | #define decl_subsys(_name,_type,_uevent_ops) \ | 173 | #define decl_subsys(_name,_type,_uevent_ops) \ |
180 | struct subsystem _name##_subsys = { \ | 174 | struct kset _name##_subsys = { \ |
181 | .kset = { \ | 175 | .kobj = { .name = __stringify(_name) }, \ |
182 | .kobj = { .name = __stringify(_name) }, \ | 176 | .ktype = _type, \ |
183 | .ktype = _type, \ | 177 | .uevent_ops =_uevent_ops, \ |
184 | .uevent_ops =_uevent_ops, \ | ||
185 | } \ | ||
186 | } | 178 | } |
187 | #define decl_subsys_name(_varname,_name,_type,_uevent_ops) \ | 179 | #define decl_subsys_name(_varname,_name,_type,_uevent_ops) \ |
188 | struct subsystem _varname##_subsys = { \ | 180 | struct kset _varname##_subsys = { \ |
189 | .kset = { \ | 181 | .kobj = { .name = __stringify(_name) }, \ |
190 | .kobj = { .name = __stringify(_name) }, \ | 182 | .ktype = _type, \ |
191 | .ktype = _type, \ | 183 | .uevent_ops =_uevent_ops, \ |
192 | .uevent_ops =_uevent_ops, \ | ||
193 | } \ | ||
194 | } | 184 | } |
195 | 185 | ||
196 | /* The global /sys/kernel/ subsystem for people to chain off of */ | 186 | /* The global /sys/kernel/ subsystem for people to chain off of */ |
197 | extern struct subsystem kernel_subsys; | 187 | extern struct kset kernel_subsys; |
198 | /* The global /sys/hypervisor/ subsystem */ | 188 | /* The global /sys/hypervisor/ subsystem */ |
199 | extern struct subsystem hypervisor_subsys; | 189 | extern struct kset hypervisor_subsys; |
200 | 190 | ||
201 | /** | 191 | /** |
202 | * Helpers for setting the kset of registered objects. | 192 | * Helpers for setting the kset of registered objects. |
@@ -214,7 +204,7 @@ extern struct subsystem hypervisor_subsys; | |||
214 | */ | 204 | */ |
215 | 205 | ||
216 | #define kobj_set_kset_s(obj,subsys) \ | 206 | #define kobj_set_kset_s(obj,subsys) \ |
217 | (obj)->kobj.kset = &(subsys).kset | 207 | (obj)->kobj.kset = &(subsys) |
218 | 208 | ||
219 | /** | 209 | /** |
220 | * kset_set_kset_s(obj,subsys) - set kset for embedded kset. | 210 | * kset_set_kset_s(obj,subsys) - set kset for embedded kset. |
@@ -228,7 +218,7 @@ extern struct subsystem hypervisor_subsys; | |||
228 | */ | 218 | */ |
229 | 219 | ||
230 | #define kset_set_kset_s(obj,subsys) \ | 220 | #define kset_set_kset_s(obj,subsys) \ |
231 | (obj)->kset.kobj.kset = &(subsys).kset | 221 | (obj)->kset.kobj.kset = &(subsys) |
232 | 222 | ||
233 | /** | 223 | /** |
234 | * subsys_set_kset(obj,subsys) - set kset for subsystem | 224 | * subsys_set_kset(obj,subsys) - set kset for subsystem |
@@ -241,29 +231,31 @@ extern struct subsystem hypervisor_subsys; | |||
241 | */ | 231 | */ |
242 | 232 | ||
243 | #define subsys_set_kset(obj,_subsys) \ | 233 | #define subsys_set_kset(obj,_subsys) \ |
244 | (obj)->subsys.kset.kobj.kset = &(_subsys).kset | 234 | (obj)->subsys.kobj.kset = &(_subsys) |
245 | 235 | ||
246 | extern void subsystem_init(struct subsystem *); | 236 | extern void subsystem_init(struct kset *); |
247 | extern int __must_check subsystem_register(struct subsystem *); | 237 | extern int __must_check subsystem_register(struct kset *); |
248 | extern void subsystem_unregister(struct subsystem *); | 238 | extern void subsystem_unregister(struct kset *); |
249 | 239 | ||
250 | static inline struct subsystem * subsys_get(struct subsystem * s) | 240 | static inline struct kset *subsys_get(struct kset *s) |
251 | { | 241 | { |
252 | return s ? container_of(kset_get(&s->kset),struct subsystem,kset) : NULL; | 242 | if (s) |
243 | return kset_get(s); | ||
244 | return NULL; | ||
253 | } | 245 | } |
254 | 246 | ||
255 | static inline void subsys_put(struct subsystem * s) | 247 | static inline void subsys_put(struct kset *s) |
256 | { | 248 | { |
257 | kset_put(&s->kset); | 249 | kset_put(s); |
258 | } | 250 | } |
259 | 251 | ||
260 | struct subsys_attribute { | 252 | struct subsys_attribute { |
261 | struct attribute attr; | 253 | struct attribute attr; |
262 | ssize_t (*show)(struct subsystem *, char *); | 254 | ssize_t (*show)(struct kset *, char *); |
263 | ssize_t (*store)(struct subsystem *, const char *, size_t); | 255 | ssize_t (*store)(struct kset *, const char *, size_t); |
264 | }; | 256 | }; |
265 | 257 | ||
266 | extern int __must_check subsys_create_file(struct subsystem * , | 258 | extern int __must_check subsys_create_file(struct kset *, |
267 | struct subsys_attribute *); | 259 | struct subsys_attribute *); |
268 | 260 | ||
269 | #if defined(CONFIG_HOTPLUG) | 261 | #if defined(CONFIG_HOTPLUG) |
diff --git a/include/linux/module.h b/include/linux/module.h index 95679eb8571e..f0b0faf42d5d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -568,7 +568,7 @@ struct device_driver; | |||
568 | #ifdef CONFIG_SYSFS | 568 | #ifdef CONFIG_SYSFS |
569 | struct module; | 569 | struct module; |
570 | 570 | ||
571 | extern struct subsystem module_subsys; | 571 | extern struct kset module_subsys; |
572 | 572 | ||
573 | int mod_sysfs_init(struct module *mod); | 573 | int mod_sysfs_init(struct module *mod); |
574 | int mod_sysfs_setup(struct module *mod, | 574 | int mod_sysfs_setup(struct module *mod, |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index a675a05c4091..ab4cb6ecd47c 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -174,7 +174,7 @@ extern int pci_hp_register (struct hotplug_slot *slot); | |||
174 | extern int pci_hp_deregister (struct hotplug_slot *slot); | 174 | extern int pci_hp_deregister (struct hotplug_slot *slot); |
175 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 175 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
176 | struct hotplug_slot_info *info); | 176 | struct hotplug_slot_info *info); |
177 | extern struct subsystem pci_hotplug_slots_subsys; | 177 | extern struct kset pci_hotplug_slots_subsys; |
178 | 178 | ||
179 | /* PCI Setting Record (Type 0) */ | 179 | /* PCI Setting Record (Type 0) */ |
180 | struct hpp_type0 { | 180 | struct hpp_type0 { |