static decl_subsys(vars, NULL);
-static decl_subsys(efi, NULL);
+static struct kset *efi_kset;
/*
* efivar_create_sysfs_entry()
/*
* For now we'll register the efi subsys within this driver
*/
-
- error = firmware_register(&efi_subsys);
-
- if (error) {
- printk(KERN_ERR "efivars: Firmware registration failed with error %d.\n", error);
+ efi_kset = kset_create_and_add("efi", NULL, &firmware_kset->kobj);
+ if (!efi_kset) {
+ printk(KERN_ERR "efivars: Firmware registration failed.\n");
+ error = -ENOMEM;
goto out_free;
}
- vars_subsys.kobj.kset = &efi_subsys;
+ vars_subsys.kobj.kset = efi_kset;
error = subsystem_register(&vars_subsys);
" due to error %d\n", error);
/* Don't forget the systab entry */
- error = sysfs_create_group(&efi_subsys.kobj, &efi_subsys_attr_group);
+ error = sysfs_create_group(&efi_kset->kobj, &efi_subsys_attr_group);
if (error)
printk(KERN_ERR "efivars: Sysfs attribute export failed with error %d.\n", error);
else
subsystem_unregister(&vars_subsys);
out_firmware_unregister:
- firmware_unregister(&efi_subsys);
+ kset_unregister(efi_kset);
out_free:
kfree(variable_name);
}
subsystem_unregister(&vars_subsys);
- firmware_unregister(&efi_subsys);
+ kset_unregister(efi_kset);
}
module_init(efivars_init);