aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/sys.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-04-13 13:15:19 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 18:57:59 -0700
commit823bccfc4002296ba88c3ad0f049e1abd8108d30 (patch)
tree5338ae0b32409446af4cd00c5107d9405d5bf0b6 /drivers/base/sys.c
parent2609e7b9bebfd433254c02538ba803dc516ff674 (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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 04e5db445c7..29f1291966c 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -25,7 +25,7 @@
#include "base.h"
-extern struct subsystem devices_subsys;
+extern struct kset devices_subsys;
#define to_sysdev(k) container_of(k, struct sys_device, kobj)
#define to_sysdev_attr(a) container_of(a, struct sysdev_attribute, attr)
@@ -138,7 +138,7 @@ int sysdev_class_register(struct sysdev_class * cls)
pr_debug("Registering sysdev class '%s'\n",
kobject_name(&cls->kset.kobj));
INIT_LIST_HEAD(&cls->drivers);
- cls->kset.subsys = &system_subsys;
+ cls->kset.kobj.parent = &system_subsys.kobj;
kset_set_kset_s(cls, system_subsys);
return kset_register(&cls->kset);
}
@@ -309,7 +309,7 @@ void sysdev_shutdown(void)
pr_debug("Shutting Down System Devices\n");
down(&sysdev_drivers_lock);
- list_for_each_entry_reverse(cls, &system_subsys.kset.list,
+ list_for_each_entry_reverse(cls, &system_subsys.list,
kset.kobj.entry) {
struct sys_device * sysdev;
@@ -384,7 +384,7 @@ int sysdev_suspend(pm_message_t state)
pr_debug("Suspending System Devices\n");
- list_for_each_entry_reverse(cls, &system_subsys.kset.list,
+ list_for_each_entry_reverse(cls, &system_subsys.list,
kset.kobj.entry) {
pr_debug("Suspending type '%s':\n",
@@ -457,7 +457,7 @@ gbl_driver:
}
/* resume other classes */
- list_for_each_entry_continue(cls, &system_subsys.kset.list,
+ list_for_each_entry_continue(cls, &system_subsys.list,
kset.kobj.entry) {
list_for_each_entry(err_dev, &cls->kset.list, kobj.entry) {
pr_debug(" %s\n", kobject_name(&err_dev->kobj));
@@ -483,7 +483,7 @@ int sysdev_resume(void)
pr_debug("Resuming System Devices\n");
- list_for_each_entry(cls, &system_subsys.kset.list, kset.kobj.entry) {
+ list_for_each_entry(cls, &system_subsys.list, kset.kobj.entry) {
struct sys_device * sysdev;
pr_debug("Resuming type '%s':\n",
@@ -501,7 +501,7 @@ int sysdev_resume(void)
int __init system_bus_init(void)
{
- system_subsys.kset.kobj.parent = &devices_subsys.kset.kobj;
+ system_subsys.kobj.parent = &devices_subsys.kobj;
return subsystem_register(&system_subsys);
}