diff options
Diffstat (limited to 'drivers/firmware/efivars.c')
-rw-r--r-- | drivers/firmware/efivars.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index ebc38534b02d..018ca1cd82bc 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -573,7 +573,7 @@ static struct attribute_group efi_subsys_attr_group = { | |||
573 | 573 | ||
574 | 574 | ||
575 | static decl_subsys(vars, NULL); | 575 | static decl_subsys(vars, NULL); |
576 | static decl_subsys(efi, NULL); | 576 | static struct kset *efi_kset; |
577 | 577 | ||
578 | /* | 578 | /* |
579 | * efivar_create_sysfs_entry() | 579 | * efivar_create_sysfs_entry() |
@@ -668,15 +668,14 @@ efivars_init(void) | |||
668 | /* | 668 | /* |
669 | * For now we'll register the efi subsys within this driver | 669 | * For now we'll register the efi subsys within this driver |
670 | */ | 670 | */ |
671 | 671 | efi_kset = kset_create_and_add("efi", NULL, &firmware_kset->kobj); | |
672 | error = firmware_register(&efi_subsys); | 672 | if (!efi_kset) { |
673 | 673 | printk(KERN_ERR "efivars: Firmware registration failed.\n"); | |
674 | if (error) { | 674 | error = -ENOMEM; |
675 | printk(KERN_ERR "efivars: Firmware registration failed with error %d.\n", error); | ||
676 | goto out_free; | 675 | goto out_free; |
677 | } | 676 | } |
678 | 677 | ||
679 | vars_subsys.kobj.kset = &efi_subsys; | 678 | vars_subsys.kobj.kset = efi_kset; |
680 | 679 | ||
681 | error = subsystem_register(&vars_subsys); | 680 | error = subsystem_register(&vars_subsys); |
682 | 681 | ||
@@ -728,7 +727,7 @@ efivars_init(void) | |||
728 | " due to error %d\n", error); | 727 | " due to error %d\n", error); |
729 | 728 | ||
730 | /* Don't forget the systab entry */ | 729 | /* Don't forget the systab entry */ |
731 | error = sysfs_create_group(&efi_subsys.kobj, &efi_subsys_attr_group); | 730 | error = sysfs_create_group(&efi_kset->kobj, &efi_subsys_attr_group); |
732 | if (error) | 731 | if (error) |
733 | printk(KERN_ERR "efivars: Sysfs attribute export failed with error %d.\n", error); | 732 | printk(KERN_ERR "efivars: Sysfs attribute export failed with error %d.\n", error); |
734 | else | 733 | else |
@@ -737,7 +736,7 @@ efivars_init(void) | |||
737 | subsystem_unregister(&vars_subsys); | 736 | subsystem_unregister(&vars_subsys); |
738 | 737 | ||
739 | out_firmware_unregister: | 738 | out_firmware_unregister: |
740 | firmware_unregister(&efi_subsys); | 739 | kset_unregister(efi_kset); |
741 | 740 | ||
742 | out_free: | 741 | out_free: |
743 | kfree(variable_name); | 742 | kfree(variable_name); |
@@ -758,7 +757,7 @@ efivars_exit(void) | |||
758 | } | 757 | } |
759 | 758 | ||
760 | subsystem_unregister(&vars_subsys); | 759 | subsystem_unregister(&vars_subsys); |
761 | firmware_unregister(&efi_subsys); | 760 | kset_unregister(efi_kset); |
762 | } | 761 | } |
763 | 762 | ||
764 | module_init(efivars_init); | 763 | module_init(efivars_init); |