mtd: introduce mtd_block_isbad interface
[deliverable/linux.git] / include / linux / mtd / mtd.h
index d6b4aa17750506a2b2594daf3c772b8fbe6daf24..a307ad093a54f8449f05b39a01c9f24b25b55e70 100644 (file)
@@ -210,6 +210,7 @@ struct mtd_info {
        int (*lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
        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 (*suspend) (struct mtd_info *mtd);
        void (*resume) (struct mtd_info *mtd);
 
@@ -219,7 +220,6 @@ struct mtd_info {
        struct backing_dev_info *backing_dev_info;
 
        /* Bad block management functions */
-       int (*block_isbad) (struct mtd_info *mtd, loff_t ofs);
        int (*block_markbad) (struct mtd_info *mtd, loff_t ofs);
 
        struct notifier_block reboot_notifier;  /* default mode before reboot */
@@ -406,6 +406,11 @@ static inline void mtd_resume(struct mtd_info *mtd)
        mtd->resume(mtd);
 }
 
+static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs)
+{
+       return mtd->block_isbad(mtd, ofs);
+}
+
 static inline struct mtd_info *dev_to_mtd(struct device *dev)
 {
        return dev ? dev_get_drvdata(dev) : NULL;
This page took 0.031 seconds and 5 git commands to generate.