]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
firmware_loader: move CONFIG_FW_LOADER_USER_HELPER switch to Makefile
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 11 Jan 2019 09:51:32 +0000 (18:51 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 09:23:18 +0000 (10:23 +0100)
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>
drivers/base/firmware_loader/Makefile
drivers/base/firmware_loader/fallback_table.c

index a97eeb0be1d8e49999eb0590c8208d738426a50a..5c7f422f7528670a7969187579bf2a576b948906 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 # Makefile for the Linux firmware loader
 
-obj-y                  := fallback_table.o
+obj-$(CONFIG_FW_LOADER_USER_HELPER) += fallback_table.o
 obj-$(CONFIG_FW_LOADER)        += firmware_class.o
 firmware_class-objs := main.o
 firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += fallback.o
index 7428659d8df944fa4d8a3b35df276ed87c37fc1c..776dd69cf5bead65906c90f878ebbabbeae58cad 100644 (file)
@@ -16,9 +16,6 @@
  * firmware fallback configuration table
  */
 
-/* Module or buit-in */
-#ifdef CONFIG_FW_LOADER_USER_HELPER
-
 static unsigned int zero;
 static unsigned int one = 1;
 
@@ -51,5 +48,3 @@ struct ctl_table firmware_config_table[] = {
        { }
 };
 EXPORT_SYMBOL_GPL(firmware_config_table);
-
-#endif