summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-06 15:08:08 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:24 -0800
commit6e90aa972dda8ef86155eefcdbdc8d34165b9f39 (patch)
treebb98edec4ecefcf8de4a246fe08c140156d6fb60 /fs
parentf55842f2329f4b3a3a6bb98b005bca3cc851d38a (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')
-rw-r--r--fs/ecryptfs/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index d984eac9a7f..4f1332107bb 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -734,7 +734,7 @@ static int ecryptfs_init_kmem_caches(void)
return 0;
}
-static struct kset *ecryptfs_kset;
+static struct kobject *ecryptfs_kobj;
static ssize_t version_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buff)
@@ -757,17 +757,17 @@ static int do_sysfs_registration(void)
{
int rc;
- ecryptfs_kset = kset_create_and_add("ecryptfs", NULL, fs_kobj);
- if (!ecryptfs_kset) {
+ ecryptfs_kobj = kobject_create_and_add("ecryptfs", fs_kobj);
+ if (!ecryptfs_kobj) {
printk(KERN_ERR "Unable to create ecryptfs kset\n");
rc = -ENOMEM;
goto out;
}
- rc = sysfs_create_group(&ecryptfs_kset->kobj, &attr_group);
+ rc = sysfs_create_group(ecryptfs_kobj, &attr_group);
if (rc) {
printk(KERN_ERR
"Unable to create ecryptfs version attributes\n");
- kset_unregister(ecryptfs_kset);
+ kobject_unregister(ecryptfs_kobj);
}
out:
return rc;
@@ -775,8 +775,8 @@ out:
static void do_sysfs_unregistration(void)
{
- sysfs_remove_group(&ecryptfs_kset->kobj, &attr_group);
- kset_unregister(ecryptfs_kset);
+ sysfs_remove_group(ecryptfs_kobj, &attr_group);
+ kobject_unregister(ecryptfs_kobj);
}
static int __init ecryptfs_init(void)