summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efivars.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-07 13:56:19 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:25 -0800
commitbc87d2fe7a1190f1c257af8a91fc490b1ee35954 (patch)
tree9aa7caacf38347cc208e300bfaa0e209e77c3be8 /drivers/firmware/efivars.c
parent6e90aa972dda8ef86155eefcdbdc8d34165b9f39 (diff)
downloadblackbird-op-linux-bc87d2fe7a1190f1c257af8a91fc490b1ee35954.tar.gz
blackbird-op-linux-bc87d2fe7a1190f1c257af8a91fc490b1ee35954.zip
kobject: convert efivars to use kobject_create
Using a kset for this simple directory is an overkill. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Matt Domsch <Matt_Domsch@dell.com> Cc: Matt Tolentino <matthew.e.tolentino@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/firmware/efivars.c')
-rw-r--r--drivers/firmware/efivars.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index d1ad48190afc..7f9f086106cc 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -573,7 +573,7 @@ static struct attribute_group efi_subsys_attr_group = {
static struct kset *vars_kset;
-static struct kset *efi_kset;
+static struct kobject *efi_kobj;
/*
* efivar_create_sysfs_entry()
@@ -665,17 +665,15 @@ efivars_init(void)
printk(KERN_INFO "EFI Variables Facility v%s %s\n", EFIVARS_VERSION,
EFIVARS_DATE);
- /*
- * For now we'll register the efi subsys within this driver
- */
- efi_kset = kset_create_and_add("efi", NULL, firmware_kobj);
- if (!efi_kset) {
+ /* For now we'll register the efi directory at /sys/firmware/efi */
+ efi_kobj = kobject_create_and_add("efi", firmware_kobj);
+ if (!efi_kobj) {
printk(KERN_ERR "efivars: Firmware registration failed.\n");
error = -ENOMEM;
goto out_free;
}
- vars_kset = kset_create_and_add("vars", NULL, &efi_kset->kobj);
+ vars_kset = kset_create_and_add("vars", NULL, efi_kobj);
if (!vars_kset) {
printk(KERN_ERR "efivars: Subsystem registration failed.\n");
error = -ENOMEM;
@@ -725,7 +723,7 @@ efivars_init(void)
" due to error %d\n", error);
/* Don't forget the systab entry */
- error = sysfs_create_group(&efi_kset->kobj, &efi_subsys_attr_group);
+ error = sysfs_create_group(efi_kobj, &efi_subsys_attr_group);
if (error)
printk(KERN_ERR "efivars: Sysfs attribute export failed with error %d.\n", error);
else
@@ -734,7 +732,7 @@ efivars_init(void)
kset_unregister(vars_kset);
out_firmware_unregister:
- kset_unregister(efi_kset);
+ kobject_unregister(efi_kobj);
out_free:
kfree(variable_name);
@@ -755,7 +753,7 @@ efivars_exit(void)
}
kset_unregister(vars_kset);
- kset_unregister(efi_kset);
+ kobject_unregister(efi_kobj);
}
module_init(efivars_init);
OpenPOWER on IntegriCloud