summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-07-18 00:07:41 +0000
committerJohannes Weiner <hannes@cmpxchg.org>2019-07-18 00:07:41 +0000
commit66d3f4662674aa4f1e66f4597c84435f894a4d88 (patch)
tree36f6136dac4726d3efb32b2291b45953b02fa9d3
parent7bda80731ea9af5425659871bb95ad9087ceb161 (diff)
proc/sysctl: make firmware loader table conditional
We get a link error in the firmware loader fallback table, which now refers to the global sysctl_vals variable: drivers/base/firmware_loader/fallback_table.o:(.data+0x2c): undefined reference to `sysctl_vals' drivers/base/firmware_loader/fallback_table.o:(.data+0x30): undefined reference to `sysctl_vals' drivers/base/firmware_loader/fallback_table.o:(.data+0x50): undefined reference to `sysctl_vals' drivers/base/firmware_loader/fallback_table.o:(.data+0x54): undefined reference to `sysctl_vals' Add an #ifdef that only builds that table when it is being used. Link: http://lkml.kernel.org/r/20190617130014.1713870-1-arnd@arndb.de Fixes: c81c506545f4 ("proc/sysctl: add shared variables for range check") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Matteo Croce <mcroce@redhat.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--drivers/base/firmware_loader/fallback_table.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
index 58d4a1263480..ba9d30b28edc 100644
--- a/drivers/base/firmware_loader/fallback_table.c
+++ b/drivers/base/firmware_loader/fallback_table.c
@@ -23,6 +23,7 @@ struct firmware_fallback_config fw_fallback_config = {
};
EXPORT_SYMBOL_GPL(fw_fallback_config);
+#ifdef CONFIG_SYSCTL
struct ctl_table firmware_config_table[] = {
{
.procname = "force_sysfs_fallback",
@@ -45,3 +46,4 @@ struct ctl_table firmware_config_table[] = {
{ }
};
EXPORT_SYMBOL_GPL(firmware_config_table);
+#endif