Commit c829a5b4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

kobject: convert parisc/pdc_stable to use kobject_create

Using a kset for this simple directory is an overkill.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Thibaut VARENE <varenet@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bc87d2fe
...@@ -960,7 +960,7 @@ static struct attribute_group pdcs_attr_group = { ...@@ -960,7 +960,7 @@ static struct attribute_group pdcs_attr_group = {
.attrs = pdcs_subsys_attrs, .attrs = pdcs_subsys_attrs,
}; };
static struct kset *stable_kset; static struct kobject *stable_kobj;
static struct kset *paths_kset; static struct kset *paths_kset;
/** /**
...@@ -1058,18 +1058,18 @@ pdc_stable_init(void) ...@@ -1058,18 +1058,18 @@ pdc_stable_init(void)
/* the actual result is 16 bits away */ /* the actual result is 16 bits away */
pdcs_osid = (u16)(result >> 16); pdcs_osid = (u16)(result >> 16);
/* For now we'll register the stable kset within this driver */ /* For now we'll register the directory at /sys/firmware/stable */
stable_kset = kset_create_and_add("stable", NULL, firmware_kobj); stable_kobj = kobject_create_and_add("stable", firmware_kobj);
if (!stable_kset) { if (!stable_kobj) {
rc = -ENOMEM; rc = -ENOMEM;
goto fail_firmreg; goto fail_firmreg;
} }
/* Don't forget the root entries */ /* Don't forget the root entries */
error = sysfs_create_group(&stable_kset->kobj, pdcs_attr_group); error = sysfs_create_group(stable_kobj, pdcs_attr_group);
/* register the paths kset as a child of the stable kset */ /* register the paths kset as a child of the stable kset */
paths_kset = kset_create_and_add("paths", NULL, &stable_kset->kobj); paths_kset = kset_create_and_add("paths", NULL, stable_kobj);
if (!paths_kset) { if (!paths_kset) {
rc = -ENOMEM; rc = -ENOMEM;
goto fail_ksetreg; goto fail_ksetreg;
...@@ -1086,7 +1086,7 @@ pdc_stable_init(void) ...@@ -1086,7 +1086,7 @@ pdc_stable_init(void)
kset_unregister(paths_kset); kset_unregister(paths_kset);
fail_ksetreg: fail_ksetreg:
kset_unregister(stable_kset); kobject_unregister(stable_kobj);
fail_firmreg: fail_firmreg:
printk(KERN_INFO PDCS_PREFIX " bailing out\n"); printk(KERN_INFO PDCS_PREFIX " bailing out\n");
...@@ -1098,7 +1098,7 @@ pdc_stable_exit(void) ...@@ -1098,7 +1098,7 @@ pdc_stable_exit(void)
{ {
pdcs_unregister_pathentries(); pdcs_unregister_pathentries();
kset_unregister(paths_kset); kset_unregister(paths_kset);
kset_unregister(stable_kset); kobject_unregister(stable_kobj);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment