Skip to content

Commit 9846d86

Browse files
committed
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>
1 parent 5d3c861 commit 9846d86

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/firmware/google/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ config GOOGLE_SMI
1515
help
1616
Say Y here if you want to enable SMI callbacks for Google
1717
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
1919
driver provides an interface for reading and writing NVRAM
2020
variables.
2121

drivers/firmware/google/gsmi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static int gsmi_exec(u8 func, u8 sub)
302302
return rc;
303303
}
304304

305-
#ifdef CONFIG_EFI_VARS
305+
#ifdef CONFIG_EFI
306306

307307
static struct efivars efivars;
308308

@@ -483,7 +483,7 @@ static const struct efivar_operations efivar_ops = {
483483
.get_next_variable = gsmi_get_next_variable,
484484
};
485485

486-
#endif /* CONFIG_EFI_VARS */
486+
#endif /* CONFIG_EFI */
487487

488488
static ssize_t eventlog_write(struct file *filp, struct kobject *kobj,
489489
struct bin_attribute *bin_attr,
@@ -1007,7 +1007,7 @@ static __init int gsmi_init(void)
10071007
goto out_remove_bin_file;
10081008
}
10091009

1010-
#ifdef CONFIG_EFI_VARS
1010+
#ifdef CONFIG_EFI
10111011
ret = efivars_register(&efivars, &efivar_ops, gsmi_kobj);
10121012
if (ret) {
10131013
printk(KERN_INFO "gsmi: Failed to register efivars\n");
@@ -1047,7 +1047,7 @@ static void __exit gsmi_exit(void)
10471047
unregister_die_notifier(&gsmi_die_notifier);
10481048
atomic_notifier_chain_unregister(&panic_notifier_list,
10491049
&gsmi_panic_notifier);
1050-
#ifdef CONFIG_EFI_VARS
1050+
#ifdef CONFIG_EFI
10511051
efivars_unregister(&efivars);
10521052
#endif
10531053

0 commit comments

Comments
 (0)