aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-10-16 12:11:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:10 -0500
commit3514faca19a6fdc209734431c509631ea92b094e (patch)
treef6d102e6dec276f8e8d1044b47c74a02b901554f /drivers/parisc
parentc11c4154e7ff4cebfadad849b1e22689d759c3f4 (diff)
kobject: remove struct kobj_type from struct kset
We don't need a "default" ktype for a kset. We should set this explicitly every time for each kset. This change is needed so that we can make ksets dynamic, and cleans up one of the odd, undocumented assumption that the kset/kobject/ktype model has. This patch is based on a lot of help from Kay Sievers. Nasty bug in the block code was found by Dave Young <hidave.darkstar@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/pdc_stable.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index ebb09e98d215..1382be64cc3f 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -964,8 +964,8 @@ static struct subsys_attribute *pdcs_subsys_attrs[] = {
964 NULL, 964 NULL,
965}; 965};
966 966
967static decl_subsys(paths, &ktype_pdcspath, NULL); 967static decl_subsys(paths, NULL);
968static decl_subsys(stable, NULL, NULL); 968static decl_subsys(stable, NULL);
969 969
970/** 970/**
971 * pdcs_register_pathentries - Prepares path entries kobjects for sysfs usage. 971 * pdcs_register_pathentries - Prepares path entries kobjects for sysfs usage.
@@ -997,7 +997,8 @@ pdcs_register_pathentries(void)
997 997
998 if ((err = kobject_set_name(&entry->kobj, "%s", entry->name))) 998 if ((err = kobject_set_name(&entry->kobj, "%s", entry->name)))
999 return err; 999 return err;
1000 kobj_set_kset_s(entry, paths_subsys); 1000 entry->kobj.kset = &paths_subsys;
1001 entry->kobj.ktype = &ktype_pdcspath;
1001 if ((err = kobject_register(&entry->kobj))) 1002 if ((err = kobject_register(&entry->kobj)))
1002 return err; 1003 return err;
1003 1004
@@ -1072,7 +1073,7 @@ pdc_stable_init(void)
1072 error = subsys_create_file(&stable_subsys, attr); 1073 error = subsys_create_file(&stable_subsys, attr);
1073 1074
1074 /* register the paths subsys as a subsystem of stable subsys */ 1075 /* register the paths subsys as a subsystem of stable subsys */
1075 kobj_set_kset_s(&paths_subsys, stable_subsys); 1076 paths_subsys.kobj.kset = &stable_subsys;
1076 if ((rc = subsystem_register(&paths_subsys))) 1077 if ((rc = subsystem_register(&paths_subsys)))
1077 goto fail_subsysreg; 1078 goto fail_subsysreg;
1078 1079