Commit 5e7e9686 authored by Jamie Iles's avatar Jamie Iles Committed by David Woodhouse

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: default avatarJamie Iles <jamie@jamieiles.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent b5c0a4ea
...@@ -472,7 +472,7 @@ config MTD_GPIO_ADDR ...@@ -472,7 +472,7 @@ config MTD_GPIO_ADDR
config MTD_UCLINUX config MTD_UCLINUX
bool "Generic uClinux RAM/ROM filesystem support" bool "Generic uClinux RAM/ROM filesystem support"
depends on MTD_PARTITIONS && MTD_RAM=y && !MMU depends on MTD_RAM=y && !MMU
help help
Map driver to support image based filesystems for uClinux. Map driver to support image based filesystems for uClinux.
......
...@@ -89,11 +89,7 @@ static int __init uclinux_mtd_init(void) ...@@ -89,11 +89,7 @@ static int __init uclinux_mtd_init(void)
mtd->priv = mapp; mtd->priv = mapp;
uclinux_ram_mtdinfo = mtd; uclinux_ram_mtdinfo = mtd;
#ifdef CONFIG_MTD_PARTITIONS mtd_device_register(mtd, uclinux_romfs, NUM_PARTITIONS);
add_mtd_partitions(mtd, uclinux_romfs, NUM_PARTITIONS);
#else
add_mtd_device(mtd);
#endif
return(0); return(0);
} }
...@@ -103,11 +99,7 @@ static int __init uclinux_mtd_init(void) ...@@ -103,11 +99,7 @@ static int __init uclinux_mtd_init(void)
static void __exit uclinux_mtd_cleanup(void) static void __exit uclinux_mtd_cleanup(void)
{ {
if (uclinux_ram_mtdinfo) { if (uclinux_ram_mtdinfo) {
#ifdef CONFIG_MTD_PARTITIONS mtd_device_unregister(uclinux_ram_mtdinfo);
del_mtd_partitions(uclinux_ram_mtdinfo);
#else
del_mtd_device(uclinux_ram_mtdinfo);
#endif
map_destroy(uclinux_ram_mtdinfo); map_destroy(uclinux_ram_mtdinfo);
uclinux_ram_mtdinfo = NULL; uclinux_ram_mtdinfo = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment