arm: mtd: gemini: convert to mtd_device_register()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue May 24 21:59:08 EDT 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c06addd3153af8e6ee10079e8afa2c3bb8a1516e
Commit:     c06addd3153af8e6ee10079e8afa2c3bb8a1516e
Parent:     3ee904f275ccbde7407ba7575006d94774cb20d9
Author:     Jamie Iles <jamie at jamieiles.com>
AuthorDate: Mon May 23 10:22:48 2011 +0100
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Wed May 25 02:20:37 2011 +0100

    arm: mtd: gemini: convert to mtd_device_register()
    
    Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
    preprocessor conditionals as partitioning is always available.
    
    Cc: Hans Ulli Kroll <ulli.kroll at googlemail.com>
    Signed-off-by: Jamie Iles <jamie at jamieiles.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 arch/arm/mach-gemini/board-wbd111.c |    7 +------
 arch/arm/mach-gemini/board-wbd222.c |    7 +------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-gemini/board-wbd111.c b/arch/arm/mach-gemini/board-wbd111.c
index af7b68a..88cc422 100644
--- a/arch/arm/mach-gemini/board-wbd111.c
+++ b/arch/arm/mach-gemini/board-wbd111.c
@@ -84,7 +84,6 @@ static struct sys_timer wbd111_timer = {
 	.init	= gemini_timer_init,
 };
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition wbd111_partitions[] = {
 	{
 		.name		= "RedBoot",
@@ -116,11 +115,7 @@ static struct mtd_partition wbd111_partitions[] = {
 		.mask_flags	= MTD_WRITEABLE,
 	}
 };
-#define wbd111_num_partitions	ARRAY_SIZE(wbd111_partitions)
-#else
-#define wbd111_partitions	NULL
-#define wbd111_num_partitions	0
-#endif /* CONFIG_MTD_PARTITIONS */
+#define wbd111_num_partitions  ARRAY_SIZE(wbd111_partitions)
 
 static void __init wbd111_init(void)
 {
diff --git a/arch/arm/mach-gemini/board-wbd222.c b/arch/arm/mach-gemini/board-wbd222.c
index 99e5bbe..3a22034 100644
--- a/arch/arm/mach-gemini/board-wbd222.c
+++ b/arch/arm/mach-gemini/board-wbd222.c
@@ -84,7 +84,6 @@ static struct sys_timer wbd222_timer = {
 	.init	= gemini_timer_init,
 };
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition wbd222_partitions[] = {
 	{
 		.name		= "RedBoot",
@@ -116,11 +115,7 @@ static struct mtd_partition wbd222_partitions[] = {
 		.mask_flags	= MTD_WRITEABLE,
 	}
 };
-#define wbd222_num_partitions	ARRAY_SIZE(wbd222_partitions)
-#else
-#define wbd222_partitions	NULL
-#define wbd222_num_partitions	0
-#endif /* CONFIG_MTD_PARTITIONS */
+#define wbd222_num_partitions  ARRAY_SIZE(wbd222_partitions)
 
 static void __init wbd222_init(void)
 {



More information about the linux-mtd-cvs mailing list