diff options
Diffstat (limited to 'include/linux/mtd/mtd.h')
-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 a307ad093a54..64aa54fba2df 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -211,6 +211,7 @@ struct mtd_info { | |||
211 | int (*unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); | 211 | int (*unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); |
212 | int (*is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); | 212 | int (*is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); |
213 | int (*block_isbad) (struct mtd_info *mtd, loff_t ofs); | 213 | int (*block_isbad) (struct mtd_info *mtd, loff_t ofs); |
214 | int (*block_markbad) (struct mtd_info *mtd, loff_t ofs); | ||
214 | int (*suspend) (struct mtd_info *mtd); | 215 | int (*suspend) (struct mtd_info *mtd); |
215 | void (*resume) (struct mtd_info *mtd); | 216 | void (*resume) (struct mtd_info *mtd); |
216 | 217 | ||
@@ -219,9 +220,6 @@ struct mtd_info { | |||
219 | */ | 220 | */ |
220 | struct backing_dev_info *backing_dev_info; | 221 | struct backing_dev_info *backing_dev_info; |
221 | 222 | ||
222 | /* Bad block management functions */ | ||
223 | int (*block_markbad) (struct mtd_info *mtd, loff_t ofs); | ||
224 | |||
225 | struct notifier_block reboot_notifier; /* default mode before reboot */ | 223 | struct notifier_block reboot_notifier; /* default mode before reboot */ |
226 | 224 | ||
227 | /* ECC status information */ | 225 | /* ECC status information */ |
@@ -411,6 +409,11 @@ static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) | |||
411 | return mtd->block_isbad(mtd, ofs); | 409 | return mtd->block_isbad(mtd, ofs); |
412 | } | 410 | } |
413 | 411 | ||
412 | static inline int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs) | ||
413 | { | ||
414 | return mtd->block_markbad(mtd, ofs); | ||
415 | } | ||
416 | |||
414 | static inline struct mtd_info *dev_to_mtd(struct device *dev) | 417 | static inline struct mtd_info *dev_to_mtd(struct device *dev) |
415 | { | 418 | { |
416 | return dev ? dev_get_drvdata(dev) : NULL; | 419 | return dev ? dev_get_drvdata(dev) : NULL; |