diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/power.c | 14 |
2 files changed, 7 insertions, 10 deletions
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 3bf01e28df33..402113c72981 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -97,7 +97,6 @@ static struct subsys_attribute sleep_while_idle_attr = { | |||
97 | .store = omap_pm_sleep_while_idle_store, | 97 | .store = omap_pm_sleep_while_idle_store, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | extern struct kset power_subsys; | ||
101 | static void (*omap_sram_idle)(void) = NULL; | 100 | static void (*omap_sram_idle)(void) = NULL; |
102 | static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL; | 101 | static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL; |
103 | 102 | ||
@@ -726,7 +725,7 @@ static int __init omap_pm_init(void) | |||
726 | omap_pm_init_proc(); | 725 | omap_pm_init_proc(); |
727 | #endif | 726 | #endif |
728 | 727 | ||
729 | error = subsys_create_file(&power_subsys, &sleep_while_idle_attr); | 728 | error = subsys_create_file(power_kset, &sleep_while_idle_attr); |
730 | if (error) | 729 | if (error) |
731 | printk(KERN_ERR "subsys_create_file failed: %d\n", error); | 730 | printk(KERN_ERR "subsys_create_file failed: %d\n", error); |
732 | 731 | ||
diff --git a/arch/powerpc/platforms/pseries/power.c b/arch/powerpc/platforms/pseries/power.c index 08d7a5007167..c36febe7ce7d 100644 --- a/arch/powerpc/platforms/pseries/power.c +++ b/arch/powerpc/platforms/pseries/power.c | |||
@@ -57,7 +57,7 @@ static struct subsys_attribute auto_poweron_attr = { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | #ifndef CONFIG_PM | 59 | #ifndef CONFIG_PM |
60 | decl_subsys(power, NULL); | 60 | struct kset *power_kset; |
61 | 61 | ||
62 | static struct attribute *g[] = { | 62 | static struct attribute *g[] = { |
63 | &auto_poweron_attr.attr, | 63 | &auto_poweron_attr.attr, |
@@ -70,18 +70,16 @@ static struct attribute_group attr_group = { | |||
70 | 70 | ||
71 | static int __init pm_init(void) | 71 | static int __init pm_init(void) |
72 | { | 72 | { |
73 | int error = subsystem_register(&power_subsys); | 73 | power_kset = kset_create_and_add("power", NULL, NULL); |
74 | if (!error) | 74 | if (!power_kset) |
75 | error = sysfs_create_group(&power_subsys.kobj, &attr_group); | 75 | return -ENOMEM; |
76 | return error; | 76 | return sysfs_create_group(&power_kset->kobj, &attr_group); |
77 | } | 77 | } |
78 | core_initcall(pm_init); | 78 | core_initcall(pm_init); |
79 | #else | 79 | #else |
80 | extern struct kset power_subsys; | ||
81 | |||
82 | static int __init apo_pm_init(void) | 80 | static int __init apo_pm_init(void) |
83 | { | 81 | { |
84 | return (subsys_create_file(&power_subsys, &auto_poweron_attr)); | 82 | return (subsys_create_file(power_kset, &auto_poweron_attr)); |
85 | } | 83 | } |
86 | __initcall(apo_pm_init); | 84 | __initcall(apo_pm_init); |
87 | #endif | 85 | #endif |