aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nandsim.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-01-29 15:58:08 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-25 06:39:03 -0500
commite99e90aef17517d99be8e049b2f5cc563cd6862a (patch)
tree3d5c62f96cf9167b48eecec2254193525010dce8 /drivers/mtd/nand/nandsim.c
parent677c2aec8cdd5ae33b5fab266941cf6c6dc4d59f (diff)
mtd: nandsim: Define CONFIG_NANDSIM_MAX_PARTS and use it instead of MAX_MTD_DEVICES
MAX_MTD_DEVICES is about to be removed. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nandsim.c')
-rw-r--r--drivers/mtd/nand/nandsim.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 3cf918048673..8a0a5d16e0eb 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -80,6 +80,9 @@
80#ifndef CONFIG_NANDSIM_DBG 80#ifndef CONFIG_NANDSIM_DBG
81#define CONFIG_NANDSIM_DBG 0 81#define CONFIG_NANDSIM_DBG 0
82#endif 82#endif
83#ifndef CONFIG_NANDSIM_MAX_PARTS
84#define CONFIG_NANDSIM_MAX_PARTS 32
85#endif
83 86
84static uint first_id_byte = CONFIG_NANDSIM_FIRST_ID_BYTE; 87static uint first_id_byte = CONFIG_NANDSIM_FIRST_ID_BYTE;
85static uint second_id_byte = CONFIG_NANDSIM_SECOND_ID_BYTE; 88static uint second_id_byte = CONFIG_NANDSIM_SECOND_ID_BYTE;
@@ -94,7 +97,7 @@ static uint bus_width = CONFIG_NANDSIM_BUS_WIDTH;
94static uint do_delays = CONFIG_NANDSIM_DO_DELAYS; 97static uint do_delays = CONFIG_NANDSIM_DO_DELAYS;
95static uint log = CONFIG_NANDSIM_LOG; 98static uint log = CONFIG_NANDSIM_LOG;
96static uint dbg = CONFIG_NANDSIM_DBG; 99static uint dbg = CONFIG_NANDSIM_DBG;
97static unsigned long parts[MAX_MTD_DEVICES]; 100static unsigned long parts[CONFIG_NANDSIM_MAX_PARTS];
98static unsigned int parts_num; 101static unsigned int parts_num;
99static char *badblocks = NULL; 102static char *badblocks = NULL;
100static char *weakblocks = NULL; 103static char *weakblocks = NULL;
@@ -288,7 +291,7 @@ union ns_mem {
288 * The structure which describes all the internal simulator data. 291 * The structure which describes all the internal simulator data.
289 */ 292 */
290struct nandsim { 293struct nandsim {
291 struct mtd_partition partitions[MAX_MTD_DEVICES]; 294 struct mtd_partition partitions[CONFIG_NANDSIM_MAX_PARTS];
292 unsigned int nbparts; 295 unsigned int nbparts;
293 296
294 uint busw; /* flash chip bus width (8 or 16) */ 297 uint busw; /* flash chip bus width (8 or 16) */