diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/mtd.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index d6b4aa177505..a307ad093a54 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -210,6 +210,7 @@ struct mtd_info { | |||
210 | int (*lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); | 210 | int (*lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); |
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 (*suspend) (struct mtd_info *mtd); | 214 | int (*suspend) (struct mtd_info *mtd); |
214 | void (*resume) (struct mtd_info *mtd); | 215 | void (*resume) (struct mtd_info *mtd); |
215 | 216 | ||
@@ -219,7 +220,6 @@ struct mtd_info { | |||
219 | struct backing_dev_info *backing_dev_info; | 220 | struct backing_dev_info *backing_dev_info; |
220 | 221 | ||
221 | /* Bad block management functions */ | 222 | /* Bad block management functions */ |
222 | int (*block_isbad) (struct mtd_info *mtd, loff_t ofs); | ||
223 | int (*block_markbad) (struct mtd_info *mtd, loff_t ofs); | 223 | int (*block_markbad) (struct mtd_info *mtd, loff_t ofs); |
224 | 224 | ||
225 | struct notifier_block reboot_notifier; /* default mode before reboot */ | 225 | struct notifier_block reboot_notifier; /* default mode before reboot */ |
@@ -406,6 +406,11 @@ static inline void mtd_resume(struct mtd_info *mtd) | |||
406 | mtd->resume(mtd); | 406 | mtd->resume(mtd); |
407 | } | 407 | } |
408 | 408 | ||
409 | static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) | ||
410 | { | ||
411 | return mtd->block_isbad(mtd, ofs); | ||
412 | } | ||
413 | |||
409 | static inline struct mtd_info *dev_to_mtd(struct device *dev) | 414 | static inline struct mtd_info *dev_to_mtd(struct device *dev) |
410 | { | 415 | { |
411 | return dev ? dev_get_drvdata(dev) : NULL; | 416 | return dev ? dev_get_drvdata(dev) : NULL; |