Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

efi: gsmi: fix false dependency on CONFIG_EFI_VARS

The gsmi code does not actually rely on CONFIG_EFI_VARS, since it only
uses the efivars abstraction that is included unconditionally when
CONFIG_EFI is defined. CONFIG_EFI_VARS controls the inclusion of the
code that exposes the sysfs entries, and which has been deprecated for
some time.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

+5 -5
+1 -1
drivers/firmware/google/Kconfig
··· 15 15 help 16 16 Say Y here if you want to enable SMI callbacks for Google 17 17 platforms. This provides an interface for writing to and 18 - clearing the event log. If EFI_VARS is also enabled this 18 + clearing the event log. If CONFIG_EFI is also enabled this 19 19 driver provides an interface for reading and writing NVRAM 20 20 variables. 21 21
+4 -4
drivers/firmware/google/gsmi.c
··· 302 302 return rc; 303 303 } 304 304 305 - #ifdef CONFIG_EFI_VARS 305 + #ifdef CONFIG_EFI 306 306 307 307 static struct efivars efivars; 308 308 ··· 483 483 .get_next_variable = gsmi_get_next_variable, 484 484 }; 485 485 486 - #endif /* CONFIG_EFI_VARS */ 486 + #endif /* CONFIG_EFI */ 487 487 488 488 static ssize_t eventlog_write(struct file *filp, struct kobject *kobj, 489 489 struct bin_attribute *bin_attr, ··· 1007 1007 goto out_remove_bin_file; 1008 1008 } 1009 1009 1010 - #ifdef CONFIG_EFI_VARS 1010 + #ifdef CONFIG_EFI 1011 1011 ret = efivars_register(&efivars, &efivar_ops, gsmi_kobj); 1012 1012 if (ret) { 1013 1013 printk(KERN_INFO "gsmi: Failed to register efivars\n"); ··· 1047 1047 unregister_die_notifier(&gsmi_die_notifier); 1048 1048 atomic_notifier_chain_unregister(&panic_notifier_list, 1049 1049 &gsmi_panic_notifier); 1050 - #ifdef CONFIG_EFI_VARS 1050 + #ifdef CONFIG_EFI 1051 1051 efivars_unregister(&efivars); 1052 1052 #endif 1053 1053