diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-13 16:15:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-02 21:57:59 -0400 |
commit | 823bccfc4002296ba88c3ad0f049e1abd8108d30 (patch) | |
tree | 5338ae0b32409446af4cd00c5107d9405d5bf0b6 /drivers/base/sys.c | |
parent | 2609e7b9bebfd433254c02538ba803dc516ff674 (diff) |
remove "struct subsystem" as it is no longer needed
We need to work on cleaning up the relationship between kobjects, ksets and
ktypes. The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.
Thanks to Kay for fixing the bugs in this patch.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/sys.c')
-rw-r--r-- | drivers/base/sys.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 04e5db445c74..29f1291966c1 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #include "base.h" | 26 | #include "base.h" |
27 | 27 | ||
28 | extern struct subsystem devices_subsys; | 28 | extern struct kset devices_subsys; |
29 | 29 | ||
30 | #define to_sysdev(k) container_of(k, struct sys_device, kobj) | 30 | #define to_sysdev(k) container_of(k, struct sys_device, kobj) |
31 | #define to_sysdev_attr(a) container_of(a, struct sysdev_attribute, attr) | 31 | #define to_sysdev_attr(a) container_of(a, struct sysdev_attribute, attr) |
@@ -138,7 +138,7 @@ int sysdev_class_register(struct sysdev_class * cls) | |||
138 | pr_debug("Registering sysdev class '%s'\n", | 138 | pr_debug("Registering sysdev class '%s'\n", |
139 | kobject_name(&cls->kset.kobj)); | 139 | kobject_name(&cls->kset.kobj)); |
140 | INIT_LIST_HEAD(&cls->drivers); | 140 | INIT_LIST_HEAD(&cls->drivers); |
141 | cls->kset.subsys = &system_subsys; | 141 | cls->kset.kobj.parent = &system_subsys.kobj; |
142 | kset_set_kset_s(cls, system_subsys); | 142 | kset_set_kset_s(cls, system_subsys); |
143 | return kset_register(&cls->kset); | 143 | return kset_register(&cls->kset); |
144 | } | 144 | } |
@@ -309,7 +309,7 @@ void sysdev_shutdown(void) | |||
309 | pr_debug("Shutting Down System Devices\n"); | 309 | pr_debug("Shutting Down System Devices\n"); |
310 | 310 | ||
311 | down(&sysdev_drivers_lock); | 311 | down(&sysdev_drivers_lock); |
312 | list_for_each_entry_reverse(cls, &system_subsys.kset.list, | 312 | list_for_each_entry_reverse(cls, &system_subsys.list, |
313 | kset.kobj.entry) { | 313 | kset.kobj.entry) { |
314 | struct sys_device * sysdev; | 314 | struct sys_device * sysdev; |
315 | 315 | ||
@@ -384,7 +384,7 @@ int sysdev_suspend(pm_message_t state) | |||
384 | 384 | ||
385 | pr_debug("Suspending System Devices\n"); | 385 | pr_debug("Suspending System Devices\n"); |
386 | 386 | ||
387 | list_for_each_entry_reverse(cls, &system_subsys.kset.list, | 387 | list_for_each_entry_reverse(cls, &system_subsys.list, |
388 | kset.kobj.entry) { | 388 | kset.kobj.entry) { |
389 | 389 | ||
390 | pr_debug("Suspending type '%s':\n", | 390 | pr_debug("Suspending type '%s':\n", |
@@ -457,7 +457,7 @@ gbl_driver: | |||
457 | } | 457 | } |
458 | 458 | ||
459 | /* resume other classes */ | 459 | /* resume other classes */ |
460 | list_for_each_entry_continue(cls, &system_subsys.kset.list, | 460 | list_for_each_entry_continue(cls, &system_subsys.list, |
461 | kset.kobj.entry) { | 461 | kset.kobj.entry) { |
462 | list_for_each_entry(err_dev, &cls->kset.list, kobj.entry) { | 462 | list_for_each_entry(err_dev, &cls->kset.list, kobj.entry) { |
463 | pr_debug(" %s\n", kobject_name(&err_dev->kobj)); | 463 | pr_debug(" %s\n", kobject_name(&err_dev->kobj)); |
@@ -483,7 +483,7 @@ int sysdev_resume(void) | |||
483 | 483 | ||
484 | pr_debug("Resuming System Devices\n"); | 484 | pr_debug("Resuming System Devices\n"); |
485 | 485 | ||
486 | list_for_each_entry(cls, &system_subsys.kset.list, kset.kobj.entry) { | 486 | list_for_each_entry(cls, &system_subsys.list, kset.kobj.entry) { |
487 | struct sys_device * sysdev; | 487 | struct sys_device * sysdev; |
488 | 488 | ||
489 | pr_debug("Resuming type '%s':\n", | 489 | pr_debug("Resuming type '%s':\n", |
@@ -501,7 +501,7 @@ int sysdev_resume(void) | |||
501 | 501 | ||
502 | int __init system_bus_init(void) | 502 | int __init system_bus_init(void) |
503 | { | 503 | { |
504 | system_subsys.kset.kobj.parent = &devices_subsys.kset.kobj; | 504 | system_subsys.kobj.parent = &devices_subsys.kobj; |
505 | return subsystem_register(&system_subsys); | 505 | return subsystem_register(&system_subsys); |
506 | } | 506 | } |
507 | 507 | ||