diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-23 12:35:30 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:25:47 -0500 |
commit | 7086c19d07429d697057587caf1e5e0345442d16 (patch) | |
tree | 3a892182dba0847de32ef79b1fe1d46d8b1b5de8 /drivers/mtd/mtdswap.c | |
parent | ead995f8d4da1e2f1ef40b0e5f4133fee38a3d3d (diff) |
mtd: introduce mtd_block_isbad interface
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdswap.c')
-rw-r--r-- | drivers/mtd/mtdswap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index cb794e761012..87aa0a6323c3 100644 --- a/drivers/mtd/mtdswap.c +++ b/drivers/mtd/mtdswap.c | |||
@@ -343,7 +343,7 @@ static int mtdswap_read_markers(struct mtdswap_dev *d, struct swap_eb *eb) | |||
343 | offset = mtdswap_eb_offset(d, eb); | 343 | offset = mtdswap_eb_offset(d, eb); |
344 | 344 | ||
345 | /* Check first if the block is bad. */ | 345 | /* Check first if the block is bad. */ |
346 | if (d->mtd->block_isbad && d->mtd->block_isbad(d->mtd, offset)) | 346 | if (d->mtd->block_isbad && mtd_block_isbad(d->mtd, offset)) |
347 | return MTDSWAP_SCANNED_BAD; | 347 | return MTDSWAP_SCANNED_BAD; |
348 | 348 | ||
349 | ops.ooblen = 2 * d->mtd->ecclayout->oobavail; | 349 | ops.ooblen = 2 * d->mtd->ecclayout->oobavail; |
@@ -1061,7 +1061,7 @@ static unsigned int mtdswap_badblocks(struct mtd_info *mtd, uint64_t size) | |||
1061 | 1061 | ||
1062 | if (mtd->block_isbad) | 1062 | if (mtd->block_isbad) |
1063 | for (offset = 0; offset < size; offset += mtd->erasesize) | 1063 | for (offset = 0; offset < size; offset += mtd->erasesize) |
1064 | if (mtd->block_isbad(mtd, offset)) | 1064 | if (mtd_block_isbad(mtd, offset)) |
1065 | badcnt++; | 1065 | badcnt++; |
1066 | 1066 | ||
1067 | return badcnt; | 1067 | return badcnt; |