[PATCH] null_blk: Move the null_blk source files into a subdirectory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since the number of source files of the null_blk driver keeps growing,
move these source files into a new subdirectory.

Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Daniel Wagner <dwagner@xxxxxxx>
Cc: Dongli Zhang <dongli.zhang@xxxxxxxxxx>
Cc: Damien Le Moal <damien.lemoal@xxxxxxx>
Cc: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
Cc: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
 drivers/block/Kconfig                         | 8 +-------
 drivers/block/Makefile                        | 7 +------
 drivers/block/null_blk/Kconfig                | 9 +++++++++
 drivers/block/null_blk/Makefile               | 8 ++++++++
 drivers/block/{ => null_blk}/null_blk.h       | 0
 drivers/block/{ => null_blk}/null_blk_main.c  | 0
 drivers/block/{ => null_blk}/null_blk_trace.c | 0
 drivers/block/{ => null_blk}/null_blk_trace.h | 0
 drivers/block/{ => null_blk}/null_blk_zoned.c | 0
 9 files changed, 19 insertions(+), 13 deletions(-)
 create mode 100644 drivers/block/null_blk/Kconfig
 create mode 100644 drivers/block/null_blk/Makefile
 rename drivers/block/{ => null_blk}/null_blk.h (100%)
 rename drivers/block/{ => null_blk}/null_blk_main.c (100%)
 rename drivers/block/{ => null_blk}/null_blk_trace.c (100%)
 rename drivers/block/{ => null_blk}/null_blk_trace.h (100%)
 rename drivers/block/{ => null_blk}/null_blk_zoned.c (100%)

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index ecceaaa1a66f..262326973ee0 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -16,13 +16,7 @@ menuconfig BLK_DEV
 
 if BLK_DEV
 
-config BLK_DEV_NULL_BLK
-	tristate "Null test block driver"
-	select CONFIGFS_FS
-
-config BLK_DEV_NULL_BLK_FAULT_INJECTION
-	bool "Support fault injection for Null test block driver"
-	depends on BLK_DEV_NULL_BLK && FAULT_INJECTION
+source "drivers/block/null_blk/Kconfig"
 
 config BLK_DEV_FD
 	tristate "Normal floppy disk support"
diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index e1f63117ee94..31bc2cfa342f 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -41,12 +41,7 @@ obj-$(CONFIG_BLK_DEV_RSXX) += rsxx/
 obj-$(CONFIG_ZRAM) += zram/
 obj-$(CONFIG_BLK_DEV_RNBD)	+= rnbd/
 
-obj-$(CONFIG_BLK_DEV_NULL_BLK)	+= null_blk.o
-null_blk-objs	:= null_blk_main.o
-ifeq ($(CONFIG_BLK_DEV_ZONED), y)
-null_blk-$(CONFIG_TRACING) += null_blk_trace.o
-endif
-null_blk-$(CONFIG_BLK_DEV_ZONED) += null_blk_zoned.o
+obj-$(CONFIG_BLK_DEV)		+= null_blk/
 
 skd-y		:= skd_main.o
 swim_mod-y	:= swim.o swim_asm.o
diff --git a/drivers/block/null_blk/Kconfig b/drivers/block/null_blk/Kconfig
new file mode 100644
index 000000000000..1ce02a3572bd
--- /dev/null
+++ b/drivers/block/null_blk/Kconfig
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config BLK_DEV_NULL_BLK
+	tristate "Null test block driver"
+	select CONFIGFS_FS
+
+config BLK_DEV_NULL_BLK_FAULT_INJECTION
+	bool "Support fault injection for Null test block driver"
+	depends on BLK_DEV_NULL_BLK && FAULT_INJECTION
diff --git a/drivers/block/null_blk/Makefile b/drivers/block/null_blk/Makefile
new file mode 100644
index 000000000000..a93a16d5ba23
--- /dev/null
+++ b/drivers/block/null_blk/Makefile
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_BLK_DEV_NULL_BLK)	+= null_blk.o
+null_blk-objs			:= null_blk_main.o
+ifeq ($(CONFIG_BLK_DEV_ZONED), y)
+null_blk-$(CONFIG_TRACING)	+= null_blk_trace.o
+endif
+null_blk-$(CONFIG_BLK_DEV_ZONED) += null_blk_zoned.o
diff --git a/drivers/block/null_blk.h b/drivers/block/null_blk/null_blk.h
similarity index 100%
rename from drivers/block/null_blk.h
rename to drivers/block/null_blk/null_blk.h
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk/null_blk_main.c
similarity index 100%
rename from drivers/block/null_blk_main.c
rename to drivers/block/null_blk/null_blk_main.c
diff --git a/drivers/block/null_blk_trace.c b/drivers/block/null_blk/null_blk_trace.c
similarity index 100%
rename from drivers/block/null_blk_trace.c
rename to drivers/block/null_blk/null_blk_trace.c
diff --git a/drivers/block/null_blk_trace.h b/drivers/block/null_blk/null_blk_trace.h
similarity index 100%
rename from drivers/block/null_blk_trace.h
rename to drivers/block/null_blk/null_blk_trace.h
diff --git a/drivers/block/null_blk_zoned.c b/drivers/block/null_blk/null_blk_zoned.c
similarity index 100%
rename from drivers/block/null_blk_zoned.c
rename to drivers/block/null_blk/null_blk_zoned.c



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux