diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-01-02 12:59:12 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 19:26:26 +0100 |
commit | 800ffd3496987e91f599a135060ef49731e045ac (patch) | |
tree | a62c4985597e6ce01d8f8ab07f67212357e2a846 /drivers/mtd/mtdswap.c | |
parent | logfs: do not use 'mtd->block_isbad' directly (diff) | |
download | linux-800ffd3496987e91f599a135060ef49731e045ac.tar.xz linux-800ffd3496987e91f599a135060ef49731e045ac.zip |
mtd: do not use mtd->block_markbad directly
Instead, use the new 'mtd_can_have_bb()', or just rely on 'mtd_block_markbad()'
return code, which will be -EOPNOTSUPP if bad blocks are not supported.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index 3fc8cb2756c0..c92f0f6bc130 100644 --- a/drivers/mtd/mtdswap.c +++ b/drivers/mtd/mtdswap.c @@ -274,7 +274,7 @@ static int mtdswap_handle_badblock(struct mtdswap_dev *d, struct swap_eb *eb) eb->root = NULL; /* badblocks not supported */ - if (!d->mtd->block_markbad) + if (!mtd_can_have_bb(d->mtd)) return 1; offset = mtdswap_eb_offset(d, eb); |