Merge tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
[linux-2.6-block.git] / include / linux / mtd / mtd.h
index 545070c2ee6473b2d395c69716df0198b6b0d4f1..677768b21a1d9da6b9a23f228527d723a70380a5 100644 (file)
@@ -208,6 +208,7 @@ struct mtd_debug_info {
 struct mtd_info {
        u_char type;
        uint32_t flags;
+       uint32_t orig_flags; /* Flags as before running mtd checks */
        uint64_t size;   // Total size of the MTD
 
        /* "Major" erase size for the device. Naïve users may take this
@@ -388,7 +389,7 @@ static inline struct device_node *mtd_get_of_node(struct mtd_info *mtd)
        return dev_of_node(&mtd->dev);
 }
 
-static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)
+static inline u32 mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)
 {
        return ops->mode == MTD_OPS_AUTO_OOB ? mtd->oobavail : mtd->oobsize;
 }