aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/mtd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd/mtd.h')
-rw-r--r--include/linux/mtd/mtd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 089370758fc9..7e35755f6931 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -440,6 +440,8 @@ static inline void mtd_resume(struct mtd_info *mtd)
440 440
441static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) 441static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs)
442{ 442{
443 if (!mtd->block_isbad)
444 return -EOPNOTSUPP;
443 return mtd->block_isbad(mtd, ofs); 445 return mtd->block_isbad(mtd, ofs);
444} 446}
445 447
@@ -483,6 +485,11 @@ static inline int mtd_has_oob(const struct mtd_info *mtd)
483 return mtd->read_oob && mtd->write_oob; 485 return mtd->read_oob && mtd->write_oob;
484} 486}
485 487
488static inline int mtd_can_have_bb(const struct mtd_info *mtd)
489{
490 return !!mtd->block_isbad;
491}
492
486 /* Kernel-side ioctl definitions */ 493 /* Kernel-side ioctl definitions */
487 494
488struct mtd_partition; 495struct mtd_partition;