[PATCH 08/10] staging: kpc2000: move the i2c driver out of its subdirectory

Greg Kroah-Hartman gregkh at linuxfoundation.org
Fri May 17 08:49:43 UTC 2019


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

Cc: Matt Sickler <Matt.Sickler at daktronics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/kpc2000/Makefile                              | 2 +-
 .../staging/kpc2000/{kpc_i2c/i2c_driver.c => kpc2000_i2c.c}   | 2 +-
 drivers/staging/kpc2000/kpc_i2c/Makefile                      | 4 ----
 3 files changed, 2 insertions(+), 6 deletions(-)
 rename drivers/staging/kpc2000/{kpc_i2c/i2c_driver.c => kpc2000_i2c.c} (99%)
 delete mode 100644 drivers/staging/kpc2000/kpc_i2c/Makefile

diff --git a/drivers/staging/kpc2000/Makefile b/drivers/staging/kpc2000/Makefile
index 99b1699a8b70..d15ed49807d5 100644
--- a/drivers/staging/kpc2000/Makefile
+++ b/drivers/staging/kpc2000/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_KPC2000) += kpc2000/
-obj-$(CONFIG_KPC2000_I2C) += kpc_i2c/
+obj-$(CONFIG_KPC2000_I2C) += kpc2000_i2c.o
 obj-$(CONFIG_KPC2000_SPI) += kpc2000_spi.o
 obj-$(CONFIG_KPC2000_DMA) += kpc_dma/
diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/kpc2000/kpc2000_i2c.c
similarity index 99%
rename from drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
rename to drivers/staging/kpc2000/kpc2000_i2c.c
index 0fb068b2408d..8f9cf8755d48 100644
--- a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
+++ b/drivers/staging/kpc2000/kpc2000_i2c.c
@@ -22,7 +22,7 @@
 #include <linux/rwsem.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
-#include "../kpc.h"
+#include "kpc.h"
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Matt.Sickler at Daktronics.com");
diff --git a/drivers/staging/kpc2000/kpc_i2c/Makefile b/drivers/staging/kpc2000/kpc_i2c/Makefile
deleted file mode 100644
index 63a6ce4b8e03..000000000000
--- a/drivers/staging/kpc2000/kpc_i2c/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-obj-m := kpc2000_i2c.o
-kpc2000_i2c-objs := i2c_driver.o
-- 
2.21.0



More information about the devel mailing list