summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2018-03-10 17:14:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-20 11:28:46 +0300
commit5d6d1ddd27301dc85b13b794262c8bcececf88f1 (patch)
treeff04f9560bb23058e6dda957d388fa7e8fc03c0c
parentd73f821c7aea16ad4f501fb87c8b5373a025e7f4 (diff)
downloadlinux-5d6d1ddd27301dc85b13b794262c8bcececf88f1.tar.xz
firmware: move firmware loader into its own directory
This will make it much easier to manage as we manage to keep trimming componnents down into their own files to more easily manage and maintain this codebase. Suggested-by: Kees Cook <keescook@chromium.org> Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--MAINTAINERS2
-rw-r--r--drivers/base/Makefile7
-rw-r--r--drivers/base/firmware_loader/Makefile7
-rw-r--r--drivers/base/firmware_loader/fallback.c (renamed from drivers/base/firmware_fallback.c)4
-rw-r--r--drivers/base/firmware_loader/fallback.h (renamed from drivers/base/firmware_fallback.h)0
-rw-r--r--drivers/base/firmware_loader/fallback_table.c (renamed from drivers/base/firmware_fallback_table.c)4
-rw-r--r--drivers/base/firmware_loader/firmware.h (renamed from drivers/base/firmware_loader.h)0
-rw-r--r--drivers/base/firmware_loader/main.c (renamed from drivers/base/firmware_loader.c)8
8 files changed, 18 insertions, 14 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 4623caf8d72d..44c6ea94d727 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5552,7 +5552,7 @@ M: Luis R. Rodriguez <mcgrof@kernel.org>
L: linux-kernel@vger.kernel.org
S: Maintained
F: Documentation/firmware_class/
-F: drivers/base/firmware*.c
+F: drivers/base/firmware_loader/
F: include/linux/firmware.h
FLASH ADAPTER DRIVER (IBM Flash Adapter 900GB Full Height PCI Flash Card)
diff --git a/drivers/base/Makefile b/drivers/base/Makefile
index b946a408256d..b9539abec675 100644
--- a/drivers/base/Makefile
+++ b/drivers/base/Makefile
@@ -5,17 +5,14 @@ obj-y := component.o core.o bus.o dd.o syscore.o \
driver.o class.o platform.o \
cpu.o firmware.o init.o map.o devres.o \
attribute_container.o transport_class.o \
- topology.o container.o property.o cacheinfo.o \
- firmware_fallback_table.o
+ topology.o container.o property.o cacheinfo.o
obj-$(CONFIG_DEVTMPFS) += devtmpfs.o
obj-$(CONFIG_DMA_CMA) += dma-contiguous.o
obj-y += power/
obj-$(CONFIG_HAS_DMA) += dma-mapping.o
obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
obj-$(CONFIG_ISA_BUS_API) += isa.o
-obj-$(CONFIG_FW_LOADER) += firmware_class.o
-firmware_class-objs := firmware_loader.o
-firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += firmware_fallback.o
+obj-y += firmware_loader/
obj-$(CONFIG_NUMA) += node.o
obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
ifeq ($(CONFIG_SYSFS),y)
diff --git a/drivers/base/firmware_loader/Makefile b/drivers/base/firmware_loader/Makefile
new file mode 100644
index 000000000000..a97eeb0be1d8
--- /dev/null
+++ b/drivers/base/firmware_loader/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+# Makefile for the Linux firmware loader
+
+obj-y := fallback_table.o
+obj-$(CONFIG_FW_LOADER) += firmware_class.o
+firmware_class-objs := main.o
+firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += fallback.o
diff --git a/drivers/base/firmware_fallback.c b/drivers/base/firmware_loader/fallback.c
index 47690207e0ee..9b65837256d6 100644
--- a/drivers/base/firmware_fallback.c
+++ b/drivers/base/firmware_loader/fallback.c
@@ -8,8 +8,8 @@
#include <linux/highmem.h>
#include <linux/umh.h>
-#include "firmware_fallback.h"
-#include "firmware_loader.h"
+#include "fallback.h"
+#include "firmware.h"
/*
* firmware fallback mechanism
diff --git a/drivers/base/firmware_fallback.h b/drivers/base/firmware_loader/fallback.h
index 550498c7fa4c..550498c7fa4c 100644
--- a/drivers/base/firmware_fallback.h
+++ b/drivers/base/firmware_loader/fallback.h
diff --git a/drivers/base/firmware_fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
index 53cc4e492520..981419044c7e 100644
--- a/drivers/base/firmware_fallback_table.c
+++ b/drivers/base/firmware_loader/fallback_table.c
@@ -9,8 +9,8 @@
#include <linux/umh.h>
#include <linux/sysctl.h>
-#include "firmware_fallback.h"
-#include "firmware_loader.h"
+#include "fallback.h"
+#include "firmware.h"
/*
* firmware fallback configuration table
diff --git a/drivers/base/firmware_loader.h b/drivers/base/firmware_loader/firmware.h
index 64acbb1a392c..64acbb1a392c 100644
--- a/drivers/base/firmware_loader.h
+++ b/drivers/base/firmware_loader/firmware.h
diff --git a/drivers/base/firmware_loader.c b/drivers/base/firmware_loader/main.c
index 21dd31ef08ae..c8966c84bd44 100644
--- a/drivers/base/firmware_loader.c
+++ b/drivers/base/firmware_loader/main.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * firmware_class.c - Multi purpose firmware loading support
+ * main.c - Multi purpose firmware loading support
*
* Copyright (c) 2003 Manuel Estrada Sainz
*
@@ -36,9 +36,9 @@
#include <generated/utsrelease.h>
-#include "base.h"
-#include "firmware_loader.h"
-#include "firmware_fallback.h"
+#include "../base.h"
+#include "firmware.h"
+#include "fallback.h"
MODULE_AUTHOR("Manuel Estrada Sainz");
MODULE_DESCRIPTION("Multi purpose firmware loading support");