summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-03 02:19:59 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-25 07:40:23 +0300
commit9651d350ab2c1b9ef1875be2a9def1c375e6503f (patch)
tree68817ecd091188b932922944317ef5ac2db6091c /drivers/firmware
parent000f2a4d8cfc1e1cbc0aa98136015e7ae7719b46 (diff)
downloadlinux-9651d350ab2c1b9ef1875be2a9def1c375e6503f.tar.xz
kset: convert edd to use kset_create
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/edd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c
index fc567fad3f7c..f07f37047cd1 100644
--- a/drivers/firmware/edd.c
+++ b/drivers/firmware/edd.c
@@ -631,7 +631,7 @@ static struct kobj_type edd_ktype = {
.default_attrs = def_attrs,
};
-static decl_subsys(edd, NULL);
+static struct kset *edd_kset;
/**
@@ -723,7 +723,7 @@ edd_device_register(struct edd_device *edev, int i)
edd_dev_set_info(edev, i);
kobject_set_name(&edev->kobj, "int13_dev%02x",
0x80 + i);
- edev->kobj.kset = &edd_subsys;
+ edev->kobj.kset = edd_kset;
edev->kobj.ktype = &edd_ktype;
error = kobject_register(&edev->kobj);
if (!error)
@@ -756,9 +756,9 @@ edd_init(void)
return 1;
}
- rc = firmware_register(&edd_subsys);
- if (rc)
- return rc;
+ edd_kset = kset_create_and_add("edd", NULL, &firmware_kset->kobj);
+ if (!edd_kset)
+ return -ENOMEM;
for (i = 0; i < edd_num_devices() && !rc; i++) {
edev = kzalloc(sizeof (*edev), GFP_KERNEL);
@@ -774,7 +774,7 @@ edd_init(void)
}
if (rc)
- firmware_unregister(&edd_subsys);
+ kset_unregister(edd_kset);
return rc;
}
@@ -788,7 +788,7 @@ edd_exit(void)
if ((edev = edd_devices[i]))
edd_device_unregister(edev);
}
- firmware_unregister(&edd_subsys);
+ kset_unregister(edd_kset);
}
late_initcall(edd_init);