diff options
Diffstat (limited to 'drivers/mtd/tests/mtd_stresstest.c')
-rw-r--r-- | drivers/mtd/tests/mtd_stresstest.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c index 63920476b57a..a99d3cd737d8 100644 --- a/drivers/mtd/tests/mtd_stresstest.c +++ b/drivers/mtd/tests/mtd_stresstest.c | |||
@@ -227,6 +227,10 @@ static int scan_for_bad_eraseblocks(void) | |||
227 | } | 227 | } |
228 | memset(bbt, 0 , ebcnt); | 228 | memset(bbt, 0 , ebcnt); |
229 | 229 | ||
230 | /* NOR flash does not implement block_isbad */ | ||
231 | if (mtd->block_isbad == NULL) | ||
232 | return 0; | ||
233 | |||
230 | printk(PRINT_PREF "scanning for bad eraseblocks\n"); | 234 | printk(PRINT_PREF "scanning for bad eraseblocks\n"); |
231 | for (i = 0; i < ebcnt; ++i) { | 235 | for (i = 0; i < ebcnt; ++i) { |
232 | bbt[i] = is_block_bad(i) ? 1 : 0; | 236 | bbt[i] = is_block_bad(i) ? 1 : 0; |
@@ -265,7 +269,7 @@ static int __init mtd_stresstest_init(void) | |||
265 | tmp = mtd->size; | 269 | tmp = mtd->size; |
266 | do_div(tmp, mtd->erasesize); | 270 | do_div(tmp, mtd->erasesize); |
267 | ebcnt = tmp; | 271 | ebcnt = tmp; |
268 | pgcnt = mtd->erasesize / mtd->writesize; | 272 | pgcnt = mtd->erasesize / pgsize; |
269 | 273 | ||
270 | printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, " | 274 | printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, " |
271 | "page size %u, count of eraseblocks %u, pages per " | 275 | "page size %u, count of eraseblocks %u, pages per " |