diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-01-02 06:59:12 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:26:26 -0500 |
commit | 800ffd3496987e91f599a135060ef49731e045ac (patch) | |
tree | a62c4985597e6ce01d8f8ab07f67212357e2a846 /include/linux/mtd | |
parent | d58b27ed58a30faf376e40d19945f34301944b8d (diff) |
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 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/mtd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 7e35755f6931..1a81fde8f333 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -447,6 +447,8 @@ static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) | |||
447 | 447 | ||
448 | static inline int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs) | 448 | static inline int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs) |
449 | { | 449 | { |
450 | if (!mtd->block_markbad) | ||
451 | return -EOPNOTSUPP; | ||
450 | return mtd->block_markbad(mtd, ofs); | 452 | return mtd->block_markbad(mtd, ofs); |
451 | } | 453 | } |
452 | 454 | ||