aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-27 14:28:26 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:25 -0500
commitd76e15fb20eeb7632ef38876a884fe3508b2c01d (patch)
tree5f3d63e70d8ac2365ee0c3f6b0489c8377ec1cd0
parent37b0c020343080241984d978981d6caf877b278a (diff)
driver core: make /sys/power a kobject
/sys/power should not be a kset, that's overkill. This patch renames it to power_kset and fixes up all usages of it in the tree. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--arch/arm/mach-omap1/pm.c2
-rw-r--r--arch/powerpc/platforms/pseries/power.c10
-rw-r--r--include/linux/kobject.h4
-rw-r--r--kernel/power/disk.c2
-rw-r--r--kernel/power/main.c8
5 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 63edafb59490..d9805e3d9304 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -719,7 +719,7 @@ static int __init omap_pm_init(void)
719 omap_pm_init_proc(); 719 omap_pm_init_proc();
720#endif 720#endif
721 721
722 error = sysfs_create_file(&power_kset->kobj, &sleep_while_idle_attr); 722 error = sysfs_create_file(power_kobj, &sleep_while_idle_attr);
723 if (error) 723 if (error)
724 printk(KERN_ERR "sysfs_create_file failed: %d\n", error); 724 printk(KERN_ERR "sysfs_create_file failed: %d\n", error);
725 725
diff --git a/arch/powerpc/platforms/pseries/power.c b/arch/powerpc/platforms/pseries/power.c
index 90706cf840fd..e95fc1594c84 100644
--- a/arch/powerpc/platforms/pseries/power.c
+++ b/arch/powerpc/platforms/pseries/power.c
@@ -53,7 +53,7 @@ static struct kobj_attribute auto_poweron_attr =
53 __ATTR(auto_poweron, 0644, auto_poweron_show, auto_poweron_store); 53 __ATTR(auto_poweron, 0644, auto_poweron_show, auto_poweron_store);
54 54
55#ifndef CONFIG_PM 55#ifndef CONFIG_PM
56struct kset *power_kset; 56struct kobject *power_kobj;
57 57
58static struct attribute *g[] = { 58static struct attribute *g[] = {
59 &auto_poweron_attr.attr, 59 &auto_poweron_attr.attr,
@@ -66,16 +66,16 @@ static struct attribute_group attr_group = {
66 66
67static int __init pm_init(void) 67static int __init pm_init(void)
68{ 68{
69 power_kset = kset_create_and_add("power", NULL, NULL); 69 power_kobj = kobject_create_and_add("power", NULL);
70 if (!power_kset) 70 if (!power_kobj)
71 return -ENOMEM; 71 return -ENOMEM;
72 return sysfs_create_group(&power_kset->kobj, &attr_group); 72 return sysfs_create_group(power_kobj, &attr_group);
73} 73}
74core_initcall(pm_init); 74core_initcall(pm_init);
75#else 75#else
76static int __init apo_pm_init(void) 76static int __init apo_pm_init(void)
77{ 77{
78 return (sysfs_create_file(&power_kset->kobj, &auto_poweron_attr)); 78 return (sysfs_create_file(power_kobj, &auto_poweron_attr));
79} 79}
80__initcall(apo_pm_init); 80__initcall(apo_pm_init);
81#endif 81#endif
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 78c851b4e67e..bb6868475edb 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -202,8 +202,8 @@ extern struct kobject * kset_find_obj(struct kset *, const char *);
202extern struct kobject *kernel_kobj; 202extern struct kobject *kernel_kobj;
203/* The global /sys/hypervisor/ kobject for people to chain off of */ 203/* The global /sys/hypervisor/ kobject for people to chain off of */
204extern struct kobject *hypervisor_kobj; 204extern struct kobject *hypervisor_kobj;
205/* The global /sys/power/ kset for people to chain off of */ 205/* The global /sys/power/ kobject for people to chain off of */
206extern struct kset *power_kset; 206extern struct kobject *power_kobj;
207/* The global /sys/firmware/ kobject for people to chain off of */ 207/* The global /sys/firmware/ kobject for people to chain off of */
208extern struct kobject *firmware_kobj; 208extern struct kobject *firmware_kobj;
209 209
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index ef5aa2ca0ab0..b138b431e271 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -714,7 +714,7 @@ static struct attribute_group attr_group = {
714 714
715static int __init pm_disk_init(void) 715static int __init pm_disk_init(void)
716{ 716{
717 return sysfs_create_group(&power_kset->kobj, &attr_group); 717 return sysfs_create_group(power_kobj, &attr_group);
718} 718}
719 719
720core_initcall(pm_disk_init); 720core_initcall(pm_disk_init);
diff --git a/kernel/power/main.c b/kernel/power/main.c
index b8139493b856..efc08360e627 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -276,7 +276,7 @@ EXPORT_SYMBOL(pm_suspend);
276 276
277#endif /* CONFIG_SUSPEND */ 277#endif /* CONFIG_SUSPEND */
278 278
279struct kset *power_kset; 279struct kobject *power_kobj;
280 280
281/** 281/**
282 * state - control system power state. 282 * state - control system power state.
@@ -389,10 +389,10 @@ static struct attribute_group attr_group = {
389 389
390static int __init pm_init(void) 390static int __init pm_init(void)
391{ 391{
392 power_kset = kset_create_and_add("power", NULL, NULL); 392 power_kobj = kobject_create_and_add("power", NULL);
393 if (!power_kset) 393 if (!power_kobj)
394 return -ENOMEM; 394 return -ENOMEM;
395 return sysfs_create_group(&power_kset->kobj, &attr_group); 395 return sysfs_create_group(power_kobj, &attr_group);
396} 396}
397 397
398core_initcall(pm_init); 398core_initcall(pm_init);