diff options
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/disk.c | 18 | ||||
-rw-r--r-- | kernel/power/main.c | 12 | ||||
-rw-r--r-- | kernel/power/power.h | 2 |
3 files changed, 21 insertions, 11 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index c3f0e61365dd..ef5aa2ca0ab0 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -567,7 +567,8 @@ static const char * const hibernation_modes[] = { | |||
567 | * supports it (as determined by having hibernation_ops). | 567 | * supports it (as determined by having hibernation_ops). |
568 | */ | 568 | */ |
569 | 569 | ||
570 | static ssize_t disk_show(struct kset *kset, char *buf) | 570 | static ssize_t disk_show(struct kobject *kobj, struct kobj_attribute *attr, |
571 | char *buf) | ||
571 | { | 572 | { |
572 | int i; | 573 | int i; |
573 | char *start = buf; | 574 | char *start = buf; |
@@ -597,7 +598,8 @@ static ssize_t disk_show(struct kset *kset, char *buf) | |||
597 | } | 598 | } |
598 | 599 | ||
599 | 600 | ||
600 | static ssize_t disk_store(struct kset *kset, const char *buf, size_t n) | 601 | static ssize_t disk_store(struct kobject *kobj, struct kobj_attribute *attr, |
602 | const char *buf, size_t n) | ||
601 | { | 603 | { |
602 | int error = 0; | 604 | int error = 0; |
603 | int i; | 605 | int i; |
@@ -642,13 +644,15 @@ static ssize_t disk_store(struct kset *kset, const char *buf, size_t n) | |||
642 | 644 | ||
643 | power_attr(disk); | 645 | power_attr(disk); |
644 | 646 | ||
645 | static ssize_t resume_show(struct kset *kset, char *buf) | 647 | static ssize_t resume_show(struct kobject *kobj, struct kobj_attribute *attr, |
648 | char *buf) | ||
646 | { | 649 | { |
647 | return sprintf(buf,"%d:%d\n", MAJOR(swsusp_resume_device), | 650 | return sprintf(buf,"%d:%d\n", MAJOR(swsusp_resume_device), |
648 | MINOR(swsusp_resume_device)); | 651 | MINOR(swsusp_resume_device)); |
649 | } | 652 | } |
650 | 653 | ||
651 | static ssize_t resume_store(struct kset *kset, const char *buf, size_t n) | 654 | static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr, |
655 | const char *buf, size_t n) | ||
652 | { | 656 | { |
653 | unsigned int maj, min; | 657 | unsigned int maj, min; |
654 | dev_t res; | 658 | dev_t res; |
@@ -674,12 +678,14 @@ static ssize_t resume_store(struct kset *kset, const char *buf, size_t n) | |||
674 | 678 | ||
675 | power_attr(resume); | 679 | power_attr(resume); |
676 | 680 | ||
677 | static ssize_t image_size_show(struct kset *kset, char *buf) | 681 | static ssize_t image_size_show(struct kobject *kobj, struct kobj_attribute *attr, |
682 | char *buf) | ||
678 | { | 683 | { |
679 | return sprintf(buf, "%lu\n", image_size); | 684 | return sprintf(buf, "%lu\n", image_size); |
680 | } | 685 | } |
681 | 686 | ||
682 | static ssize_t image_size_store(struct kset *kset, const char *buf, size_t n) | 687 | static ssize_t image_size_store(struct kobject *kobj, struct kobj_attribute *attr, |
688 | const char *buf, size_t n) | ||
683 | { | 689 | { |
684 | unsigned long size; | 690 | unsigned long size; |
685 | 691 | ||
diff --git a/kernel/power/main.c b/kernel/power/main.c index dce2d76d66de..b8139493b856 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -289,7 +289,8 @@ struct kset *power_kset; | |||
289 | * proper enumerated value, and initiates a suspend transition. | 289 | * proper enumerated value, and initiates a suspend transition. |
290 | */ | 290 | */ |
291 | 291 | ||
292 | static ssize_t state_show(struct kset *kset, char *buf) | 292 | static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, |
293 | char *buf) | ||
293 | { | 294 | { |
294 | char *s = buf; | 295 | char *s = buf; |
295 | #ifdef CONFIG_SUSPEND | 296 | #ifdef CONFIG_SUSPEND |
@@ -310,7 +311,8 @@ static ssize_t state_show(struct kset *kset, char *buf) | |||
310 | return (s - buf); | 311 | return (s - buf); |
311 | } | 312 | } |
312 | 313 | ||
313 | static ssize_t state_store(struct kset *kset, const char *buf, size_t n) | 314 | static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr, |
315 | const char *buf, size_t n) | ||
314 | { | 316 | { |
315 | #ifdef CONFIG_SUSPEND | 317 | #ifdef CONFIG_SUSPEND |
316 | suspend_state_t state = PM_SUSPEND_STANDBY; | 318 | suspend_state_t state = PM_SUSPEND_STANDBY; |
@@ -347,13 +349,15 @@ power_attr(state); | |||
347 | #ifdef CONFIG_PM_TRACE | 349 | #ifdef CONFIG_PM_TRACE |
348 | int pm_trace_enabled; | 350 | int pm_trace_enabled; |
349 | 351 | ||
350 | static ssize_t pm_trace_show(struct kset *kset, char *buf) | 352 | static ssize_t pm_trace_show(struct kobject *kobj, struct kobj_attribute *attr, |
353 | char *buf) | ||
351 | { | 354 | { |
352 | return sprintf(buf, "%d\n", pm_trace_enabled); | 355 | return sprintf(buf, "%d\n", pm_trace_enabled); |
353 | } | 356 | } |
354 | 357 | ||
355 | static ssize_t | 358 | static ssize_t |
356 | pm_trace_store(struct kset *kset, const char *buf, size_t n) | 359 | pm_trace_store(struct kobject *kobj, struct kobj_attribute *attr, |
360 | const char *buf, size_t n) | ||
357 | { | 361 | { |
358 | int val; | 362 | int val; |
359 | 363 | ||
diff --git a/kernel/power/power.h b/kernel/power/power.h index 1083e6b188ab..2093c3a9a994 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h | |||
@@ -54,7 +54,7 @@ extern int pfn_is_nosave(unsigned long); | |||
54 | extern struct mutex pm_mutex; | 54 | extern struct mutex pm_mutex; |
55 | 55 | ||
56 | #define power_attr(_name) \ | 56 | #define power_attr(_name) \ |
57 | static struct subsys_attribute _name##_attr = { \ | 57 | static struct kobj_attribute _name##_attr = { \ |
58 | .attr = { \ | 58 | .attr = { \ |
59 | .name = __stringify(_name), \ | 59 | .name = __stringify(_name), \ |
60 | .mode = 0644, \ | 60 | .mode = 0644, \ |