Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75771
b: refs/heads/master
c: 79393fc
h: refs/heads/master
i:
  75769: fabe721
  75767: aeff252
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent 700ddfb commit 1321dab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 851324c6ffdf94976b4a925d0684a4faa993b9ca
refs/heads/master: 79393fc46ede43451a500a132e5de9856f5a4c83
20 changes: 8 additions & 12 deletions trunk/arch/powerpc/platforms/pseries/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@

unsigned long rtas_poweron_auto; /* default and normal state is 0 */

static ssize_t auto_poweron_show(struct kset *kset, char *buf)
static ssize_t auto_poweron_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return sprintf(buf, "%lu\n", rtas_poweron_auto);
}

static ssize_t
auto_poweron_store(struct kset *kset, const char *buf, size_t n)
static ssize_t auto_poweron_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t n)
{
int ret;
unsigned long ups_restart;
Expand All @@ -47,14 +49,8 @@ auto_poweron_store(struct kset *kset, const char *buf, size_t n)
return -EINVAL;
}

static struct subsys_attribute auto_poweron_attr = {
.attr = {
.name = __stringify(auto_poweron),
.mode = 0644,
},
.show = auto_poweron_show,
.store = auto_poweron_store,
};
static struct kobj_attribute auto_poweron_attr =
__ATTR(auto_poweron, 0644, auto_poweron_show, auto_poweron_store);

#ifndef CONFIG_PM
struct kset *power_kset;
Expand All @@ -79,7 +75,7 @@ core_initcall(pm_init);
#else
static int __init apo_pm_init(void)
{
return (subsys_create_file(power_kset, &auto_poweron_attr));
return (sysfs_create_file(&power_kset->kobj, &auto_poweron_attr));
}
__initcall(apo_pm_init);
#endif

0 comments on commit 1321dab

Please sign in to comment.