diff options
author | Scott Wood <scottwood@freescale.com> | 2008-10-31 13:51:12 -0500 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2008-10-31 13:51:12 -0500 |
commit | 2f77c7f45b9a37ef265a8dbe3c18efa706fed214 (patch) | |
tree | b57841574f9f5772c778b126f09e55492766c55a /fs/jffs2 | |
parent | c57fc28947e248fb03c49a28b467686299895055 (diff) | |
download | bootable_bootloader_goldelico_gta04-2f77c7f45b9a37ef265a8dbe3c18efa706fed214.zip bootable_bootloader_goldelico_gta04-2f77c7f45b9a37ef265a8dbe3c18efa706fed214.tar.gz bootable_bootloader_goldelico_gta04-2f77c7f45b9a37ef265a8dbe3c18efa706fed214.tar.bz2 |
JFFS2: Eliminate compiler error when both NAND and OneNAND are enabled.
Reported-by: Alessandro Rubini <rubini-list@gnudd.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/jffs2_1pass.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 0177268..920d2fd 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -449,20 +449,18 @@ static inline void *get_node_mem(u32 off) static inline void put_fl_mem(void *buf) { -#if defined(CONFIG_JFFS2_NAND) && \ - defined(CONFIG_CMD_NAND) struct mtdids *id = current_part->dev->id; - if (id->type == MTD_DEV_TYPE_NAND) + switch (id->type) { +#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND) + case MTD_DEV_TYPE_NAND: return put_fl_mem_nand(buf); #endif - #if defined(CONFIG_CMD_ONENAND) - struct mtdids *id = current_part->dev->id; - - if (id->type == MTD_DEV_TYPE_ONENAND) + case MTD_DEV_TYPE_ONENAND: return put_fl_mem_onenand(buf); #endif + } } /* Compression names */ |