Skip to content

Commit 5d6d1dd

Browse files
mcgrofgregkh
authored andcommitted
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>
1 parent d73f821 commit 5d6d1dd

8 files changed

Lines changed: 18 additions & 14 deletions

File tree

‎MAINTAINERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5552,7 +5552,7 @@ M: Luis R. Rodriguez <mcgrof@kernel.org>
55525552
L: linux-kernel@vger.kernel.org
55535553
S: Maintained
55545554
F: Documentation/firmware_class/
5555-
F: drivers/base/firmware*.c
5555+
F: drivers/base/firmware_loader/
55565556
F: include/linux/firmware.h
55575557

55585558
FLASH ADAPTER DRIVER (IBM Flash Adapter 900GB Full Height PCI Flash Card)

‎drivers/base/Makefile‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@ obj-y := component.o core.o bus.o dd.o syscore.o \
55
driver.o class.o platform.o \
66
cpu.o firmware.o init.o map.o devres.o \
77
attribute_container.o transport_class.o \
8-
topology.o container.o property.o cacheinfo.o \
9-
firmware_fallback_table.o
8+
topology.o container.o property.o cacheinfo.o
109
obj-$(CONFIG_DEVTMPFS) += devtmpfs.o
1110
obj-$(CONFIG_DMA_CMA) += dma-contiguous.o
1211
obj-y += power/
1312
obj-$(CONFIG_HAS_DMA) += dma-mapping.o
1413
obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o
1514
obj-$(CONFIG_ISA_BUS_API) += isa.o
16-
obj-$(CONFIG_FW_LOADER) += firmware_class.o
17-
firmware_class-objs := firmware_loader.o
18-
firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += firmware_fallback.o
15+
obj-y += firmware_loader/
1916
obj-$(CONFIG_NUMA) += node.o
2017
obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o
2118
ifeq ($(CONFIG_SYSFS),y)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
# Makefile for the Linux firmware loader
3+
4+
obj-y := fallback_table.o
5+
obj-$(CONFIG_FW_LOADER) += firmware_class.o
6+
firmware_class-objs := main.o
7+
firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += fallback.o
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include <linux/highmem.h>
99
#include <linux/umh.h>
1010

11-
#include "firmware_fallback.h"
12-
#include "firmware_loader.h"
11+
#include "fallback.h"
12+
#include "firmware.h"
1313

1414
/*
1515
* firmware fallback mechanism

drivers/base/firmware_fallback_table.c renamed to drivers/base/firmware_loader/fallback_table.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <linux/umh.h>
1010
#include <linux/sysctl.h>
1111

12-
#include "firmware_fallback.h"
13-
#include "firmware_loader.h"
12+
#include "fallback.h"
13+
#include "firmware.h"
1414

1515
/*
1616
* firmware fallback configuration table
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/*
3-
* firmware_class.c - Multi purpose firmware loading support
3+
* main.c - Multi purpose firmware loading support
44
*
55
* Copyright (c) 2003 Manuel Estrada Sainz
66
*
@@ -36,9 +36,9 @@
3636

3737
#include <generated/utsrelease.h>
3838

39-
#include "base.h"
40-
#include "firmware_loader.h"
41-
#include "firmware_fallback.h"
39+
#include "../base.h"
40+
#include "firmware.h"
41+
#include "fallback.h"
4242

4343
MODULE_AUTHOR("Manuel Estrada Sainz");
4444
MODULE_DESCRIPTION("Multi purpose firmware loading support");

0 commit comments

Comments
 (0)