aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/power.c')
-rw-r--r--arch/powerpc/platforms/pseries/power.c14
1 files changed, 6 insertions, 8 deletions
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
60decl_subsys(power, NULL); 60struct kset *power_kset;
61 61
62static struct attribute *g[] = { 62static 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
71static int __init pm_init(void) 71static 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}
78core_initcall(pm_init); 78core_initcall(pm_init);
79#else 79#else
80extern struct kset power_subsys;
81
82static int __init apo_pm_init(void) 80static 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