diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-11-02 08:47:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:18 -0500 |
commit | 386f275f5d097758f867bc99ddeaeb7a03b6b190 (patch) | |
tree | bd27130e78e1aad1ce080f8c8ca76b9166b33ed4 /kernel/power/disk.c | |
parent | 23b5212cc7422f475b82124334b64277b5b43013 (diff) |
Driver Core: switch all dynamic ksets to kobj_sysfs_ops
Switch all dynamically created ksets, that export simple attributes,
to kobj_attribute from subsys_attribute. Struct subsys_attribute will
be removed.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mike Halcrow <mhalcrow@us.ibm.com>
Cc: Phillip Hellewell <phillip@hellewell.homeip.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r-- | kernel/power/disk.c | 18 |
1 files changed, 12 insertions, 6 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 | ||