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>
This commit is contained in:
@@ -160,7 +160,7 @@ static int uio_dev_add_attributes(struct uio_device *idev)
|
||||
if (!map_found) {
|
||||
map_found = 1;
|
||||
kobject_set_name(&idev->map_attr_kset.kobj,"maps");
|
||||
idev->map_attr_kset.ktype = &map_attr_type;
|
||||
idev->map_attr_kset.kobj.ktype = &map_attr_type;
|
||||
idev->map_attr_kset.kobj.parent = &idev->dev->kobj;
|
||||
ret = kset_register(&idev->map_attr_kset);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user