diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-06 18:08:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:24 -0500 |
commit | 6e90aa972dda8ef86155eefcdbdc8d34165b9f39 (patch) | |
tree | bb98edec4ecefcf8de4a246fe08c140156d6fb60 /fs/ecryptfs | |
parent | f55842f2329f4b3a3a6bb98b005bca3cc851d38a (diff) |
kobject: convert ecryptfs to use kobject_create
Using a kset for this trivial directory is an overkill.
Cc: 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')
-rw-r--r-- | fs/ecryptfs/main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index d984eac9a7f5..4f1332107bbd 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -734,7 +734,7 @@ static int ecryptfs_init_kmem_caches(void) | |||
734 | return 0; | 734 | return 0; |
735 | } | 735 | } |
736 | 736 | ||
737 | static struct kset *ecryptfs_kset; | 737 | static struct kobject *ecryptfs_kobj; |
738 | 738 | ||
739 | static ssize_t version_show(struct kobject *kobj, | 739 | static ssize_t version_show(struct kobject *kobj, |
740 | struct kobj_attribute *attr, char *buff) | 740 | struct kobj_attribute *attr, char *buff) |
@@ -757,17 +757,17 @@ static int do_sysfs_registration(void) | |||
757 | { | 757 | { |
758 | int rc; | 758 | int rc; |
759 | 759 | ||
760 | ecryptfs_kset = kset_create_and_add("ecryptfs", NULL, fs_kobj); | 760 | ecryptfs_kobj = kobject_create_and_add("ecryptfs", fs_kobj); |
761 | if (!ecryptfs_kset) { | 761 | if (!ecryptfs_kobj) { |
762 | printk(KERN_ERR "Unable to create ecryptfs kset\n"); | 762 | printk(KERN_ERR "Unable to create ecryptfs kset\n"); |
763 | rc = -ENOMEM; | 763 | rc = -ENOMEM; |
764 | goto out; | 764 | goto out; |
765 | } | 765 | } |
766 | rc = sysfs_create_group(&ecryptfs_kset->kobj, &attr_group); | 766 | rc = sysfs_create_group(ecryptfs_kobj, &attr_group); |
767 | if (rc) { | 767 | if (rc) { |
768 | printk(KERN_ERR | 768 | printk(KERN_ERR |
769 | "Unable to create ecryptfs version attributes\n"); | 769 | "Unable to create ecryptfs version attributes\n"); |
770 | kset_unregister(ecryptfs_kset); | 770 | kobject_unregister(ecryptfs_kobj); |
771 | } | 771 | } |
772 | out: | 772 | out: |
773 | return rc; | 773 | return rc; |
@@ -775,8 +775,8 @@ out: | |||
775 | 775 | ||
776 | static void do_sysfs_unregistration(void) | 776 | static void do_sysfs_unregistration(void) |
777 | { | 777 | { |
778 | sysfs_remove_group(&ecryptfs_kset->kobj, &attr_group); | 778 | sysfs_remove_group(ecryptfs_kobj, &attr_group); |
779 | kset_unregister(ecryptfs_kset); | 779 | kobject_unregister(ecryptfs_kobj); |
780 | } | 780 | } |
781 | 781 | ||
782 | static int __init ecryptfs_init(void) | 782 | static int __init ecryptfs_init(void) |