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

firmware_loader: move CONFIG_FW_LOADER_USER_HELPER switch to Makefile

The whole code of fallback_table.c is surrounded by #ifdef of
CONFIG_FW_LOADER_USER_HELPER.

Move the CONFIG_FW_LOADER_USER_HELPER switch to Makefile so that
it is not compiled at all when this CONFIG option is disabled.

I also removed the confusing comment, "Module or buit-in [sic]".
CONFIG_FW_LOADER_USER_HELPER is a boolean option.
(If it were a module, CONFIG_FW_LOADER_USER_HELPER_MODULE would
be defined instead.)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Masahiro Yamada and committed by
Greg Kroah-Hartman
91f382a4 925f8d4a

+1 -6
+1 -1
drivers/base/firmware_loader/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # Makefile for the Linux firmware loader 3 3 4 - obj-y := fallback_table.o 4 + obj-$(CONFIG_FW_LOADER_USER_HELPER) += fallback_table.o 5 5 obj-$(CONFIG_FW_LOADER) += firmware_class.o 6 6 firmware_class-objs := main.o 7 7 firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += fallback.o
-5
drivers/base/firmware_loader/fallback_table.c
··· 16 16 * firmware fallback configuration table 17 17 */ 18 18 19 - /* Module or buit-in */ 20 - #ifdef CONFIG_FW_LOADER_USER_HELPER 21 - 22 19 static unsigned int zero; 23 20 static unsigned int one = 1; 24 21 ··· 48 51 { } 49 52 }; 50 53 EXPORT_SYMBOL_GPL(firmware_config_table); 51 - 52 - #endif