diff options
author | Timofei Bondarenko <tim@ipi.ac.ru> | 2009-05-20 19:59:02 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-09-19 11:44:51 -0700 |
commit | 3ff230a742b8fc196c1fe69875a57a429877cacb (patch) | |
tree | e5825c0cccc7b7a1d5e6d975a96fc73a48fa6ce3 /drivers/mtd/maps/uclinux.c | |
parent | 9aff1b1afe9a30c358d1c3a0bb50ae77bd7f994b (diff) |
mtd/maps: uclinux: fix building when partition support is disabled
The uClinux map driver doesn't even use partitions, so we shouldn't require
it in order to work properly.
Signed-off-by: Timofei Bondarenko <tim@ipi.ac.ru>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
CC: Greg Ungerer <gerg@uclinux.org>
CC: uclinux-dev@uclinux.org
CC: linux-mtd@lists.infradead.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/uclinux.c')
-rw-r--r-- | drivers/mtd/maps/uclinux.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index d4314fb8821..35009294b43 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c @@ -89,7 +89,11 @@ static int __init uclinux_mtd_init(void) mtd->priv = mapp; uclinux_ram_mtdinfo = mtd; +#ifdef CONFIG_MTD_PARTITIONS add_mtd_partitions(mtd, uclinux_romfs, NUM_PARTITIONS); +#else + add_mtd_device(mtd); +#endif return(0); } @@ -99,7 +103,11 @@ static int __init uclinux_mtd_init(void) static void __exit uclinux_mtd_cleanup(void) { if (uclinux_ram_mtdinfo) { +#ifdef CONFIG_MTD_PARTITIONS del_mtd_partitions(uclinux_ram_mtdinfo); +#else + del_mtd_device(uclinux_ram_mtdinfo); +#endif map_destroy(uclinux_ram_mtdinfo); uclinux_ram_mtdinfo = NULL; } |