[PATCH 1/4] mtd: intel-spi: rename intel-spi to intel-spi-base

Mauro Lima mauro.lima at eclypsium.com
Fri Sep 10 14:13:45 PDT 2021


Rename the files we want to split as base files.
Include the new files in intel-spi-{pci|platform}.c.
Change the intel-spi obj Makefile to be built with
intel-spi-base.

Suggested-by: Daniel Gutson <daniel.gutson at eclypsium.com>
Suggested-by: Richard Hughes <richard at hughsie.com>
Signed-off-by: Mauro Lima <mauro.lima at eclypsium.com>
---
 drivers/mtd/spi-nor/controllers/Makefile                        | 1 +
 .../mtd/spi-nor/controllers/{intel-spi.c => intel-spi-base.c}   | 2 +-
 .../mtd/spi-nor/controllers/{intel-spi.h => intel-spi-base.h}   | 0
 drivers/mtd/spi-nor/controllers/intel-spi-pci.c                 | 2 +-
 drivers/mtd/spi-nor/controllers/intel-spi-platform.c            | 2 +-
 5 files changed, 4 insertions(+), 3 deletions(-)
 rename drivers/mtd/spi-nor/controllers/{intel-spi.c => intel-spi-base.c} (99%)
 rename drivers/mtd/spi-nor/controllers/{intel-spi.h => intel-spi-base.h} (100%)

diff --git a/drivers/mtd/spi-nor/controllers/Makefile b/drivers/mtd/spi-nor/controllers/Makefile
index e7abba491d98..fa2dc480d2c8 100644
--- a/drivers/mtd/spi-nor/controllers/Makefile
+++ b/drivers/mtd/spi-nor/controllers/Makefile
@@ -3,5 +3,6 @@ obj-$(CONFIG_SPI_ASPEED_SMC)	+= aspeed-smc.o
 obj-$(CONFIG_SPI_HISI_SFC)	+= hisi-sfc.o
 obj-$(CONFIG_SPI_NXP_SPIFI)	+= nxp-spifi.o
 obj-$(CONFIG_SPI_INTEL_SPI)	+= intel-spi.o
+intel-spi-y := intel-spi-base.o
 obj-$(CONFIG_SPI_INTEL_SPI_PCI)	+= intel-spi-pci.o
 obj-$(CONFIG_SPI_INTEL_SPI_PLATFORM)	+= intel-spi-platform.o
diff --git a/drivers/mtd/spi-nor/controllers/intel-spi.c b/drivers/mtd/spi-nor/controllers/intel-spi-base.c
similarity index 99%
rename from drivers/mtd/spi-nor/controllers/intel-spi.c
rename to drivers/mtd/spi-nor/controllers/intel-spi-base.c
index a413892ff449..362fb41b969e 100644
--- a/drivers/mtd/spi-nor/controllers/intel-spi.c
+++ b/drivers/mtd/spi-nor/controllers/intel-spi-base.c
@@ -16,7 +16,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/spi-nor.h>
 
-#include "intel-spi.h"
+#include "intel-spi-base.h"
 
 /* Offsets are from @ispi->base */
 #define BFPREG				0x00
diff --git a/drivers/mtd/spi-nor/controllers/intel-spi.h b/drivers/mtd/spi-nor/controllers/intel-spi-base.h
similarity index 100%
rename from drivers/mtd/spi-nor/controllers/intel-spi.h
rename to drivers/mtd/spi-nor/controllers/intel-spi-base.h
diff --git a/drivers/mtd/spi-nor/controllers/intel-spi-pci.c b/drivers/mtd/spi-nor/controllers/intel-spi-pci.c
index 1bc53b8bb88a..46db2743e244 100644
--- a/drivers/mtd/spi-nor/controllers/intel-spi-pci.c
+++ b/drivers/mtd/spi-nor/controllers/intel-spi-pci.c
@@ -11,7 +11,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include "intel-spi.h"
+#include "intel-spi-base.h"
 
 #define BCR		0xdc
 #define BCR_WPD		BIT(0)
diff --git a/drivers/mtd/spi-nor/controllers/intel-spi-platform.c b/drivers/mtd/spi-nor/controllers/intel-spi-platform.c
index f80f1086f928..5d6b6125c4b5 100644
--- a/drivers/mtd/spi-nor/controllers/intel-spi-platform.c
+++ b/drivers/mtd/spi-nor/controllers/intel-spi-platform.c
@@ -10,7 +10,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
-#include "intel-spi.h"
+#include "intel-spi-base.h"
 
 static int intel_spi_platform_probe(struct platform_device *pdev)
 {
-- 
2.31.1


-- 


This e-mail and any attachments may contain information that is 
privileged, confidential,  and/or exempt from disclosure under applicable 
law.  If you are not the intended recipient, you are hereby notified that 
any disclosure, copying, distribution or use of any information contained 
herein is strictly prohibited. If you have received this transmission in 
error, please immediately notify the sender and destroy the original 
transmission and any attachments, whether in electronic or hard copy 
format, without reading or saving.















More information about the linux-mtd mailing list