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)
{
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;
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)