Skip to content

Commit

Permalink
mtd/maps: uclinux: fix building when partition support is disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Timofei Bondarenko authored and David Woodhouse committed Sep 19, 2009
1 parent 9aff1b1 commit 3ff230a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/mtd/maps/uclinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 3ff230a

Please sign in to comment.