浏览代码

mtd: kill CONFIG_MTD_PARTITIONS

Now that none of the drivers use CONFIG_MTD_PARTITIONS we can remove
it from Kconfig and the last remaining uses.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Jamie Iles 14 年之前
父节点
当前提交
6a8a98b22b

+ 1 - 2
Documentation/DocBook/mtdnand.tmpl

@@ -189,8 +189,7 @@ static void __iomem *baseaddr;
 		<title>Partition defines</title>
 		<title>Partition defines</title>
 		<para>
 		<para>
 			If you want to divide your device into partitions, then
 			If you want to divide your device into partitions, then
-			enable the configuration switch CONFIG_MTD_PARTITIONS and define
-			a partitioning scheme suitable to your board.
+			define a partitioning scheme suitable to your board.
 		</para>
 		</para>
 		<programlisting>
 		<programlisting>
 #define NUM_PARTITIONS 2
 #define NUM_PARTITIONS 2

+ 1 - 9
drivers/mtd/Kconfig

@@ -1,7 +1,6 @@
 menuconfig MTD
 menuconfig MTD
 	tristate "Memory Technology Device (MTD) support"
 	tristate "Memory Technology Device (MTD) support"
 	depends on HAS_IOMEM
 	depends on HAS_IOMEM
-	select MTD_PARTITIONS
 	help
 	help
 	  Memory Technology Devices are flash, RAM and similar chips, often
 	  Memory Technology Devices are flash, RAM and similar chips, often
 	  used for solid state file systems on embedded devices. This option
 	  used for solid state file systems on embedded devices. This option
@@ -34,11 +33,6 @@ config MTD_TESTS
 	  should normally be compiled as kernel modules. The modules perform
 	  should normally be compiled as kernel modules. The modules perform
 	  various checks and verifications when loaded.
 	  various checks and verifications when loaded.
 
 
-config MTD_PARTITIONS
-	bool
-
-if MTD_PARTITIONS
-
 config MTD_REDBOOT_PARTS
 config MTD_REDBOOT_PARTS
 	tristate "RedBoot partition table parsing"
 	tristate "RedBoot partition table parsing"
 	---help---
 	---help---
@@ -91,7 +85,7 @@ endif # MTD_REDBOOT_PARTS
 
 
 config MTD_CMDLINE_PARTS
 config MTD_CMDLINE_PARTS
 	bool "Command line partition table parsing"
 	bool "Command line partition table parsing"
-	depends on MTD_PARTITIONS = "y" && MTD = "y"
+	depends on MTD = "y"
 	---help---
 	---help---
 	  Allow generic configuration of the MTD partition tables via the kernel
 	  Allow generic configuration of the MTD partition tables via the kernel
 	  command line. Multiple flash resources are supported for hardware where
 	  command line. Multiple flash resources are supported for hardware where
@@ -156,8 +150,6 @@ config MTD_AR7_PARTS
 	---help---
 	---help---
 	  TI AR7 partitioning support
 	  TI AR7 partitioning support
 
 
-endif # MTD_PARTITIONS
-
 comment "User Modules And Translation Layers"
 comment "User Modules And Translation Layers"
 
 
 config MTD_CHAR
 config MTD_CHAR

+ 1 - 2
drivers/mtd/Makefile

@@ -4,8 +4,7 @@
 
 
 # Core functionality.
 # Core functionality.
 obj-$(CONFIG_MTD)		+= mtd.o
 obj-$(CONFIG_MTD)		+= mtd.o
-mtd-y				:= mtdcore.o mtdsuper.o mtdconcat.o
-mtd-$(CONFIG_MTD_PARTITIONS)	+= mtdpart.o
+mtd-y				:= mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o
 mtd-$(CONFIG_MTD_OF_PARTS)	+= ofpart.o
 mtd-$(CONFIG_MTD_OF_PARTS)	+= ofpart.o
 
 
 obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
 obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o

+ 5 - 9
drivers/mtd/maps/Kconfig

@@ -82,7 +82,6 @@ config MTD_PHYSMAP_OF
 config MTD_PMC_MSP_EVM
 config MTD_PMC_MSP_EVM
 	tristate "CFI Flash device mapped on PMC-Sierra MSP"
 	tristate "CFI Flash device mapped on PMC-Sierra MSP"
 	depends on PMC_MSP && MTD_CFI
 	depends on PMC_MSP && MTD_CFI
-	select MTD_PARTITIONS
 	help
 	help
 	  This provides a 'mapping' driver which supports the way
 	  This provides a 'mapping' driver which supports the way
 	  in which user-programmable flash chips are connected on the
 	  in which user-programmable flash chips are connected on the
@@ -122,7 +121,7 @@ config MTD_SC520CDP
 
 
 config MTD_NETSC520
 config MTD_NETSC520
 	tristate "CFI Flash device mapped on AMD NetSc520"
 	tristate "CFI Flash device mapped on AMD NetSc520"
-	depends on X86 && MTD_CFI && MTD_PARTITIONS
+	depends on X86 && MTD_CFI
 	help
 	help
 	  This enables access routines for the flash chips on the AMD NetSc520
 	  This enables access routines for the flash chips on the AMD NetSc520
 	  demonstration board. If you have one of these boards and would like
 	  demonstration board. If you have one of these boards and would like
@@ -131,7 +130,6 @@ config MTD_NETSC520
 config MTD_TS5500
 config MTD_TS5500
 	tristate "JEDEC Flash device mapped on Technologic Systems TS-5500"
 	tristate "JEDEC Flash device mapped on Technologic Systems TS-5500"
 	depends on X86
 	depends on X86
-	select MTD_PARTITIONS
 	select MTD_JEDECPROBE
 	select MTD_JEDECPROBE
 	select MTD_CFI_AMDSTD
 	select MTD_CFI_AMDSTD
 	help
 	help
@@ -149,7 +147,7 @@ config MTD_TS5500
 
 
 config MTD_SBC_GXX
 config MTD_SBC_GXX
 	tristate "CFI Flash device mapped on Arcom SBC-GXx boards"
 	tristate "CFI Flash device mapped on Arcom SBC-GXx boards"
-	depends on X86 && MTD_CFI_INTELEXT && MTD_PARTITIONS && MTD_COMPLEX_MAPPINGS
+	depends on X86 && MTD_CFI_INTELEXT && MTD_COMPLEX_MAPPINGS
 	help
 	help
 	  This provides a driver for the on-board flash of Arcom Control
 	  This provides a driver for the on-board flash of Arcom Control
 	  Systems' SBC-GXn family of boards, formerly known as SBC-MediaGX.
 	  Systems' SBC-GXn family of boards, formerly known as SBC-MediaGX.
@@ -246,7 +244,7 @@ config MTD_TSUNAMI
 
 
 config MTD_NETtel
 config MTD_NETtel
 	tristate "CFI flash device on SnapGear/SecureEdge"
 	tristate "CFI flash device on SnapGear/SecureEdge"
-	depends on X86 && MTD_PARTITIONS && MTD_JEDECPROBE
+	depends on X86 && MTD_JEDECPROBE
 	help
 	help
 	  Support for flash chips on NETtel/SecureEdge/SnapGear boards.
 	  Support for flash chips on NETtel/SecureEdge/SnapGear boards.
 
 
@@ -261,7 +259,7 @@ config MTD_BCM963XX
 
 
 config MTD_DILNETPC
 config MTD_DILNETPC
 	tristate "CFI Flash device mapped on DIL/Net PC"
 	tristate "CFI Flash device mapped on DIL/Net PC"
-	depends on X86 && MTD_PARTITIONS && MTD_CFI_INTELEXT && BROKEN
+	depends on X86 && MTD_CFI_INTELEXT && BROKEN
 	help
 	help
 	  MTD map driver for SSV DIL/Net PC Boards "DNP" and "ADNP".
 	  MTD map driver for SSV DIL/Net PC Boards "DNP" and "ADNP".
 	  For details, see <http://www.ssv-embedded.de/ssv/pc104/p169.htm>
 	  For details, see <http://www.ssv-embedded.de/ssv/pc104/p169.htm>
@@ -381,7 +379,7 @@ config MTD_IXP2000
 
 
 config MTD_FORTUNET
 config MTD_FORTUNET
 	tristate "CFI Flash device mapped on the FortuNet board"
 	tristate "CFI Flash device mapped on the FortuNet board"
-	depends on MTD_CFI && MTD_PARTITIONS && SA1100_FORTUNET
+	depends on MTD_CFI && SA1100_FORTUNET
 	help
 	help
 	  This enables access to the Flash on the FortuNet board.  If you
 	  This enables access to the Flash on the FortuNet board.  If you
 	  have such a board, say 'Y'.
 	  have such a board, say 'Y'.
@@ -479,7 +477,6 @@ config MTD_UCLINUX
 config MTD_WRSBC8260
 config MTD_WRSBC8260
 	tristate "Map driver for WindRiver PowerQUICC II MPC82xx board"
 	tristate "Map driver for WindRiver PowerQUICC II MPC82xx board"
 	depends on (SBC82xx || SBC8560)
 	depends on (SBC82xx || SBC8560)
-	select MTD_PARTITIONS
 	select MTD_MAP_BANK_WIDTH_4
 	select MTD_MAP_BANK_WIDTH_4
 	select MTD_MAP_BANK_WIDTH_1
 	select MTD_MAP_BANK_WIDTH_1
 	select MTD_CFI_I1
 	select MTD_CFI_I1
@@ -492,7 +489,6 @@ config MTD_WRSBC8260
 config MTD_DMV182
 config MTD_DMV182
         tristate "Map driver for Dy-4 SVME/DMV-182 board."
         tristate "Map driver for Dy-4 SVME/DMV-182 board."
         depends on DMV182
         depends on DMV182
-        select MTD_PARTITIONS
 	select MTD_MAP_BANK_WIDTH_32
 	select MTD_MAP_BANK_WIDTH_32
 	select MTD_CFI_I8
 	select MTD_CFI_I8
 	select MTD_CFI_AMDSTD
 	select MTD_CFI_AMDSTD

+ 0 - 5
drivers/mtd/mtdchar.c

@@ -508,7 +508,6 @@ static int shrink_ecclayout(const struct nand_ecclayout *from,
 	return 0;
 	return 0;
 }
 }
 
 
-#ifdef CONFIG_MTD_PARTITIONS
 static int mtd_blkpg_ioctl(struct mtd_info *mtd,
 static int mtd_blkpg_ioctl(struct mtd_info *mtd,
 			   struct blkpg_ioctl_arg __user *arg)
 			   struct blkpg_ioctl_arg __user *arg)
 {
 {
@@ -544,8 +543,6 @@ static int mtd_blkpg_ioctl(struct mtd_info *mtd,
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 }
 }
-#endif
-
 
 
 static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
 static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
 {
 {
@@ -937,7 +934,6 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
 		break;
 		break;
 	}
 	}
 
 
-#ifdef CONFIG_MTD_PARTITIONS
 	case BLKPG:
 	case BLKPG:
 	{
 	{
 		ret = mtd_blkpg_ioctl(mtd,
 		ret = mtd_blkpg_ioctl(mtd,
@@ -951,7 +947,6 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
 		ret = 0;
 		ret = 0;
 		break;
 		break;
 	}
 	}
-#endif
 
 
 	default:
 	default:
 		ret = -ENOTTY;
 		ret = -ENOTTY;

+ 1 - 2
drivers/mtd/nand/Kconfig

@@ -419,7 +419,6 @@ config MTD_NAND_TMIO
 
 
 config MTD_NAND_NANDSIM
 config MTD_NAND_NANDSIM
 	tristate "Support for NAND Flash Simulator"
 	tristate "Support for NAND Flash Simulator"
-	depends on MTD_PARTITIONS
 	help
 	help
 	  The simulator may simulate various NAND flash chips for the
 	  The simulator may simulate various NAND flash chips for the
 	  MTD nand layer.
 	  MTD nand layer.
@@ -513,7 +512,7 @@ config MTD_NAND_SOCRATES
 
 
 config MTD_NAND_NUC900
 config MTD_NAND_NUC900
 	tristate "Support for NAND on Nuvoton NUC9xx/w90p910 evaluation boards."
 	tristate "Support for NAND on Nuvoton NUC9xx/w90p910 evaluation boards."
-	depends on ARCH_W90X900 && MTD_PARTITIONS
+	depends on ARCH_W90X900
 	help
 	help
 	  This enables the driver for the NAND Flash on evaluation board based
 	  This enables the driver for the NAND Flash on evaluation board based
 	  on w90p910 / NUC9xx.
 	  on w90p910 / NUC9xx.

+ 0 - 8
include/linux/mtd/mtd.h

@@ -353,15 +353,7 @@ int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs,
 
 
 void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size);
 void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size);
 
 
-#ifdef CONFIG_MTD_PARTITIONS
 void mtd_erase_callback(struct erase_info *instr);
 void mtd_erase_callback(struct erase_info *instr);
-#else
-static inline void mtd_erase_callback(struct erase_info *instr)
-{
-	if (instr->callback)
-		instr->callback(instr);
-}
-#endif
 
 
 /*
 /*
  * Debugging macro and defines
  * Debugging macro and defines