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>
This commit is contained in:
Artem Bityutskiy
2011-12-23 19:35:30 +02:00
committed by David Woodhouse
parent ead995f8d4
commit 7086c19d07
21 changed files with 34 additions and 30 deletions

View File

@@ -157,7 +157,7 @@ static struct page *logfs_mtd_find_first_sb(struct super_block *sb, u64 *ofs)
return NULL;
*ofs = 0;
while (mtd->block_isbad(mtd, *ofs)) {
while (mtd_block_isbad(mtd, *ofs)) {
*ofs += mtd->erasesize;
if (*ofs >= mtd->size)
return NULL;
@@ -177,7 +177,7 @@ static struct page *logfs_mtd_find_last_sb(struct super_block *sb, u64 *ofs)
return NULL;
*ofs = mtd->size - mtd->erasesize;
while (mtd->block_isbad(mtd, *ofs)) {
while (mtd_block_isbad(mtd, *ofs)) {
*ofs -= mtd->erasesize;
if (*ofs <= 0)
return NULL;