diff options
author | Luis R. Rodriguez <mcgrof@kernel.org> | 2018-03-10 06:14:49 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 09:28:46 +0100 |
commit | d73f821c7aea16ad4f501fb87c8b5373a025e7f4 (patch) | |
tree | b5569508c13989c673b681fbff3125a10314d573 /drivers/base/firmware_fallback_table.c | |
parent | e05cb73f83918b9bde2063de08467f2261d0f5bb (diff) |
firmware: split firmware fallback functionality into its own file
The firmware fallback code is optional. Split that code out to help
distinguish the fallback functionlity from othere core firmware loader
features. This should make it easier to maintain and review code
changes.
The reason for keeping the configuration onto a table which is built-in
if you enable firmware loading is so that we can later enable the kernel
after subsequent patches to tweak this configuration, even if the
firmware loader is modular.
This introduces no functional changes.
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/firmware_fallback_table.c')
-rw-r--r-- | drivers/base/firmware_fallback_table.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/base/firmware_fallback_table.c b/drivers/base/firmware_fallback_table.c new file mode 100644 index 000000000000..53cc4e492520 --- /dev/null +++ b/drivers/base/firmware_fallback_table.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/types.h> +#include <linux/kconfig.h> +#include <linux/list.h> +#include <linux/slab.h> +#include <linux/security.h> +#include <linux/highmem.h> +#include <linux/umh.h> +#include <linux/sysctl.h> + +#include "firmware_fallback.h" +#include "firmware_loader.h" + +/* + * firmware fallback configuration table + */ + +/* Module or buit-in */ +#ifdef CONFIG_FW_LOADER_USER_HELPER + +struct firmware_fallback_config fw_fallback_config = { + .force_sysfs_fallback = IS_ENABLED(CONFIG_FW_LOADER_USER_HELPER_FALLBACK), + .loading_timeout = 60, + .old_timeout = 60, +}; +EXPORT_SYMBOL_GPL(fw_fallback_config); + +#endif |