diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-23 19:37:38 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 18:25:48 +0000 |
commit | 5942ddbc500d1c9b75e571b656be97f65b26adfe (patch) | |
tree | 7e96cfb905fb67bc40e1da30eb8454d674353a36 /include | |
parent | 7086c19d07429d697057587caf1e5e0345442d16 (diff) |
mtd: introduce mtd_block_markbad interface
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/mtd.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index a307ad093a5..64aa54fba2d 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -211,6 +211,7 @@ struct mtd_info { int (*unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); int (*is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); int (*block_isbad) (struct mtd_info *mtd, loff_t ofs); + int (*block_markbad) (struct mtd_info *mtd, loff_t ofs); int (*suspend) (struct mtd_info *mtd); void (*resume) (struct mtd_info *mtd); @@ -219,9 +220,6 @@ struct mtd_info { */ struct backing_dev_info *backing_dev_info; - /* Bad block management functions */ - int (*block_markbad) (struct mtd_info *mtd, loff_t ofs); - struct notifier_block reboot_notifier; /* default mode before reboot */ /* ECC status information */ @@ -411,6 +409,11 @@ static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) return mtd->block_isbad(mtd, ofs); } +static inline int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs) +{ + return mtd->block_markbad(mtd, ofs); +} + static inline struct mtd_info *dev_to_mtd(struct device *dev) { return dev ? dev_get_drvdata(dev) : NULL; |