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 /fs/ecryptfs/main.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 'fs/ecryptfs/main.c')
-rw-r--r-- | fs/ecryptfs/main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index bdeac3877a84..6ded37b467ff 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -736,12 +736,13 @@ static int ecryptfs_init_kmem_caches(void) | |||
736 | 736 | ||
737 | static struct kset *ecryptfs_kset; | 737 | static struct kset *ecryptfs_kset; |
738 | 738 | ||
739 | static ssize_t version_show(struct kset *kset, char *buff) | 739 | static ssize_t version_show(struct kobject *kobj, |
740 | struct kobj_attribute *attr, char *buff) | ||
740 | { | 741 | { |
741 | return snprintf(buff, PAGE_SIZE, "%d\n", ECRYPTFS_VERSIONING_MASK); | 742 | return snprintf(buff, PAGE_SIZE, "%d\n", ECRYPTFS_VERSIONING_MASK); |
742 | } | 743 | } |
743 | 744 | ||
744 | static struct subsys_attribute version_attr = __ATTR_RO(version); | 745 | static struct kobj_attribute version_attr = __ATTR_RO(version); |
745 | 746 | ||
746 | static struct ecryptfs_version_str_map_elem { | 747 | static struct ecryptfs_version_str_map_elem { |
747 | u32 flag; | 748 | u32 flag; |
@@ -755,7 +756,8 @@ static struct ecryptfs_version_str_map_elem { | |||
755 | {ECRYPTFS_VERSIONING_MULTKEY, "multiple keys per file"} | 756 | {ECRYPTFS_VERSIONING_MULTKEY, "multiple keys per file"} |
756 | }; | 757 | }; |
757 | 758 | ||
758 | static ssize_t version_str_show(struct kset *kset, char *buff) | 759 | static ssize_t version_str_show(struct kobject *kobj, |
760 | struct kobj_attribute *attr, char *buff) | ||
759 | { | 761 | { |
760 | int i; | 762 | int i; |
761 | int remaining = PAGE_SIZE; | 763 | int remaining = PAGE_SIZE; |
@@ -782,7 +784,7 @@ out: | |||
782 | return total_written; | 784 | return total_written; |
783 | } | 785 | } |
784 | 786 | ||
785 | static struct subsys_attribute version_attr_str = __ATTR_RO(version_str); | 787 | static struct kobj_attribute version_attr_str = __ATTR_RO(version_str); |
786 | 788 | ||
787 | static struct attribute *attributes[] = { | 789 | static struct attribute *attributes[] = { |
788 | &version_attr.attr, | 790 | &version_attr.attr, |