There is no need for a subdirectory for just a single .c file.  So move
it out of kpc_spi/ and rename it to the module name that we want the
file to build to, saving one more linking stage.

Cc: Matt Sickler <matt.sick...@daktronics.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 drivers/staging/kpc2000/Makefile                              | 2 +-
 .../staging/kpc2000/{kpc_spi/spi_driver.c => kpc2000_spi.c}   | 2 +-
 drivers/staging/kpc2000/kpc_spi/Makefile                      | 4 ----
 3 files changed, 2 insertions(+), 6 deletions(-)
 rename drivers/staging/kpc2000/{kpc_spi/spi_driver.c => kpc2000_spi.c} (99%)
 delete mode 100644 drivers/staging/kpc2000/kpc_spi/Makefile

diff --git a/drivers/staging/kpc2000/Makefile b/drivers/staging/kpc2000/Makefile
index 1e48e9df1329..99b1699a8b70 100644
--- a/drivers/staging/kpc2000/Makefile
+++ b/drivers/staging/kpc2000/Makefile
@@ -2,5 +2,5 @@
 
 obj-$(CONFIG_KPC2000) += kpc2000/
 obj-$(CONFIG_KPC2000_I2C) += kpc_i2c/
-obj-$(CONFIG_KPC2000_SPI) += kpc_spi/
+obj-$(CONFIG_KPC2000_SPI) += kpc2000_spi.o
 obj-$(CONFIG_KPC2000_DMA) += kpc_dma/
diff --git a/drivers/staging/kpc2000/kpc_spi/spi_driver.c 
b/drivers/staging/kpc2000/kpc2000_spi.c
similarity index 99%
rename from drivers/staging/kpc2000/kpc_spi/spi_driver.c
rename to drivers/staging/kpc2000/kpc2000_spi.c
index e84bd7015ecf..075ae4fafa7d 100644
--- a/drivers/staging/kpc2000/kpc_spi/spi_driver.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -27,7 +27,7 @@
 #include <linux/spi/flash.h>
 #include <linux/mtd/partitions.h>
 
-#include "../kpc.h"
+#include "kpc.h"
 
 static struct mtd_partition p2kr0_spi0_parts[] = {
        { .name = "SLOT_0",     .size = 7798784,                .offset = 0,    
            },
diff --git a/drivers/staging/kpc2000/kpc_spi/Makefile 
b/drivers/staging/kpc2000/kpc_spi/Makefile
deleted file mode 100644
index 3018d200484f..000000000000
--- a/drivers/staging/kpc2000/kpc_spi/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-obj-m += kpc2000_spi.o
-kpc2000_spi-objs := spi_driver.o
-- 
2.21.0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to