diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-07 16:56:19 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:25 -0500 |
commit | c829a5b49858a83cc7bb5e1e730796575f5bb261 (patch) | |
tree | 3f6cdd26f46ff4f089f1b0e595c7162442df0e1a /drivers | |
parent | bc87d2fe7a1190f1c257af8a91fc490b1ee35954 (diff) |
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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/parisc/pdc_stable.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index ef1a353e5540..880b10b8a311 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -960,7 +960,7 @@ static struct attribute_group pdcs_attr_group = { | |||
960 | .attrs = pdcs_subsys_attrs, | 960 | .attrs = pdcs_subsys_attrs, |
961 | }; | 961 | }; |
962 | 962 | ||
963 | static struct kset *stable_kset; | 963 | static struct kobject *stable_kobj; |
964 | static struct kset *paths_kset; | 964 | static struct kset *paths_kset; |
965 | 965 | ||
966 | /** | 966 | /** |
@@ -1058,18 +1058,18 @@ pdc_stable_init(void) | |||
1058 | /* the actual result is 16 bits away */ | 1058 | /* the actual result is 16 bits away */ |
1059 | pdcs_osid = (u16)(result >> 16); | 1059 | pdcs_osid = (u16)(result >> 16); |
1060 | 1060 | ||
1061 | /* For now we'll register the stable kset within this driver */ | 1061 | /* For now we'll register the directory at /sys/firmware/stable */ |
1062 | stable_kset = kset_create_and_add("stable", NULL, firmware_kobj); | 1062 | stable_kobj = kobject_create_and_add("stable", firmware_kobj); |
1063 | if (!stable_kset) { | 1063 | if (!stable_kobj) { |
1064 | rc = -ENOMEM; | 1064 | rc = -ENOMEM; |
1065 | goto fail_firmreg; | 1065 | goto fail_firmreg; |
1066 | } | 1066 | } |
1067 | 1067 | ||
1068 | /* Don't forget the root entries */ | 1068 | /* Don't forget the root entries */ |
1069 | error = sysfs_create_group(&stable_kset->kobj, pdcs_attr_group); | 1069 | error = sysfs_create_group(stable_kobj, pdcs_attr_group); |
1070 | 1070 | ||
1071 | /* register the paths kset as a child of the stable kset */ | 1071 | /* register the paths kset as a child of the stable kset */ |
1072 | paths_kset = kset_create_and_add("paths", NULL, &stable_kset->kobj); | 1072 | paths_kset = kset_create_and_add("paths", NULL, stable_kobj); |
1073 | if (!paths_kset) { | 1073 | if (!paths_kset) { |
1074 | rc = -ENOMEM; | 1074 | rc = -ENOMEM; |
1075 | goto fail_ksetreg; | 1075 | goto fail_ksetreg; |
@@ -1086,7 +1086,7 @@ fail_pdcsreg: | |||
1086 | kset_unregister(paths_kset); | 1086 | kset_unregister(paths_kset); |
1087 | 1087 | ||
1088 | fail_ksetreg: | 1088 | fail_ksetreg: |
1089 | kset_unregister(stable_kset); | 1089 | kobject_unregister(stable_kobj); |
1090 | 1090 | ||
1091 | fail_firmreg: | 1091 | fail_firmreg: |
1092 | printk(KERN_INFO PDCS_PREFIX " bailing out\n"); | 1092 | printk(KERN_INFO PDCS_PREFIX " bailing out\n"); |
@@ -1098,7 +1098,7 @@ pdc_stable_exit(void) | |||
1098 | { | 1098 | { |
1099 | pdcs_unregister_pathentries(); | 1099 | pdcs_unregister_pathentries(); |
1100 | kset_unregister(paths_kset); | 1100 | kset_unregister(paths_kset); |
1101 | kset_unregister(stable_kset); | 1101 | kobject_unregister(stable_kobj); |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | 1104 | ||