aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-05-23 05:23:12 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-24 21:23:09 -0400
commit5e7e96866df7a9ff7733bd1660e0a3c510bf1b45 (patch)
tree618f843e92f79342897387388fc5ade0e68a363a /drivers/mtd/maps
parentb5c0a4ea1ba0b6840bc8522c6ce901a7658b395a (diff)
mtd: uclinux: convert to mtd_device_register()
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS preprocessor conditionals as partitioning is always available. 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>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/Kconfig2
-rw-r--r--drivers/mtd/maps/uclinux.c12
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index add25a94ce4a..44032433730d 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -472,7 +472,7 @@ config MTD_GPIO_ADDR
472 472
473config MTD_UCLINUX 473config MTD_UCLINUX
474 bool "Generic uClinux RAM/ROM filesystem support" 474 bool "Generic uClinux RAM/ROM filesystem support"
475 depends on MTD_PARTITIONS && MTD_RAM=y && !MMU 475 depends on MTD_RAM=y && !MMU
476 help 476 help
477 Map driver to support image based filesystems for uClinux. 477 Map driver to support image based filesystems for uClinux.
478 478
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
index 35009294b435..6793074f3f40 100644
--- a/drivers/mtd/maps/uclinux.c
+++ b/drivers/mtd/maps/uclinux.c
@@ -89,11 +89,7 @@ static int __init uclinux_mtd_init(void)
89 mtd->priv = mapp; 89 mtd->priv = mapp;
90 90
91 uclinux_ram_mtdinfo = mtd; 91 uclinux_ram_mtdinfo = mtd;
92#ifdef CONFIG_MTD_PARTITIONS 92 mtd_device_register(mtd, uclinux_romfs, NUM_PARTITIONS);
93 add_mtd_partitions(mtd, uclinux_romfs, NUM_PARTITIONS);
94#else
95 add_mtd_device(mtd);
96#endif
97 93
98 return(0); 94 return(0);
99} 95}
@@ -103,11 +99,7 @@ static int __init uclinux_mtd_init(void)
103static void __exit uclinux_mtd_cleanup(void) 99static void __exit uclinux_mtd_cleanup(void)
104{ 100{
105 if (uclinux_ram_mtdinfo) { 101 if (uclinux_ram_mtdinfo) {
106#ifdef CONFIG_MTD_PARTITIONS 102 mtd_device_unregister(uclinux_ram_mtdinfo);
107 del_mtd_partitions(uclinux_ram_mtdinfo);
108#else
109 del_mtd_device(uclinux_ram_mtdinfo);
110#endif
111 map_destroy(uclinux_ram_mtdinfo); 103 map_destroy(uclinux_ram_mtdinfo);
112 uclinux_ram_mtdinfo = NULL; 104 uclinux_ram_mtdinfo = NULL;
113 } 105 }