.filter = uevent_filter,
};
-static decl_subsys(slab, &slab_uevent_ops);
+static struct kset *slab_kset;
#define ID_STR_LENGTH 64
* This is typically the case for debug situations. In that
* case we can catch duplicate names easily.
*/
- sysfs_remove_link(&slab_subsys.kobj, s->name);
+ sysfs_remove_link(&slab_kset->kobj, s->name);
name = s->name;
} else {
/*
}
kobject_set_name(&s->kobj, name);
- s->kobj.kset = &slab_subsys;
+ s->kobj.kset = slab_kset;
s->kobj.ktype = &slab_ktype;
kobject_init(&s->kobj);
err = kobject_add(&s->kobj);
/*
* If we have a leftover link then remove it.
*/
- sysfs_remove_link(&slab_subsys.kobj, name);
- return sysfs_create_link(&slab_subsys.kobj,
- &s->kobj, name);
+ sysfs_remove_link(&slab_kset->kobj, name);
+ return sysfs_create_link(&slab_kset->kobj, &s->kobj, name);
}
al = kmalloc(sizeof(struct saved_alias), GFP_KERNEL);
struct kmem_cache *s;
int err;
- err = subsystem_register(&slab_subsys);
- if (err) {
+ slab_kset = kset_create_and_add("slab", &slab_uevent_ops, NULL);
+ if (!slab_kset) {
printk(KERN_ERR "Cannot register slab subsystem.\n");
return -ENOSYS;
}