diff options
Diffstat (limited to 'drivers/firmware/google')
-rw-r--r-- | drivers/firmware/google/gsmi.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c index c409a7577afc..757b2d92d5b0 100644 --- a/drivers/firmware/google/gsmi.c +++ b/drivers/firmware/google/gsmi.c @@ -882,12 +882,19 @@ static __init int gsmi_init(void) goto out_remove_bin_file; } - ret = register_efivars(&efivars, &efivar_ops, gsmi_kobj); + ret = efivars_register(&efivars, &efivar_ops, gsmi_kobj); if (ret) { printk(KERN_INFO "gsmi: Failed to register efivars\n"); goto out_remove_sysfs_files; } + ret = efivars_sysfs_init(); + if (ret) { + printk(KERN_INFO "gsmi: Failed to create efivars files\n"); + efivars_unregister(&efivars); + goto out_remove_sysfs_files; + } + register_reboot_notifier(&gsmi_reboot_notifier); register_die_notifier(&gsmi_die_notifier); atomic_notifier_chain_register(&panic_notifier_list, @@ -919,7 +926,7 @@ static void __exit gsmi_exit(void) unregister_die_notifier(&gsmi_die_notifier); atomic_notifier_chain_unregister(&panic_notifier_list, &gsmi_panic_notifier); - unregister_efivars(&efivars); + efivars_unregister(&efivars); sysfs_remove_files(gsmi_kobj, gsmi_attrs); sysfs_remove_bin_file(gsmi_kobj, &eventlog_bin_attr); |