OSDN Git Service

staging: kpc2000: move the i2c driver out of its subdirectory
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 May 2019 08:47:14 +0000 (10:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 06:14:18 +0000 (08:14 +0200)
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@daktronics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/kpc2000/Makefile
drivers/staging/kpc2000/kpc2000_i2c.c [moved from drivers/staging/kpc2000/kpc_i2c/i2c_driver.c with 99% similarity]
drivers/staging/kpc2000/kpc_i2c/Makefile [deleted file]

index 99b1699..d15ed49 100644 (file)
@@ -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/
similarity index 99%
rename from drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
rename to drivers/staging/kpc2000/kpc2000_i2c.c
index 986148c..4206131 100644 (file)
@@ -28,7 +28,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@Daktronics.com");
diff --git a/drivers/staging/kpc2000/kpc_i2c/Makefile b/drivers/staging/kpc2000/kpc_i2c/Makefile
deleted file mode 100644 (file)
index 63a6ce4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-obj-m := kpc2000_i2c.o
-kpc2000_i2c-objs := i2c_driver.o