diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-01-02 13:59:12 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 18:26:26 +0000 |
commit | 800ffd3496987e91f599a135060ef49731e045ac (patch) | |
tree | a62c4985597e6ce01d8f8ab07f67212357e2a846 /drivers/mtd/mtdconcat.c | |
parent | d58b27ed58a30faf376e40d19945f34301944b8d (diff) | |
download | op-kernel-dev-800ffd3496987e91f599a135060ef49731e045ac.zip op-kernel-dev-800ffd3496987e91f599a135060ef49731e045ac.tar.gz |
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/mtdconcat.c')
-rw-r--r-- | drivers/mtd/mtdconcat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index fbf3cb1..1ed5103 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -673,7 +673,7 @@ static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs) struct mtd_concat *concat = CONCAT(mtd); int i, err = -EINVAL; - if (!concat->subdev[0]->block_markbad) + if (!mtd_can_have_bb(concat->subdev[0])) return 0; if (ofs > mtd->size) |