]> git.sur5r.net Git - u-boot/blobdiff - include/linux/mtd/mtd.h
mtd: nand: Sync with Linux v4.6
[u-boot] / include / linux / mtd / mtd.h
index 9da77ec1441428f69870dc655b07a056479f063d..cf20674549c56385e09e9ce1efd4ef0957f72825 100644 (file)
@@ -278,6 +278,11 @@ struct mtd_info {
        int usecount;
 };
 
+static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)
+{
+       return ops->mode == MTD_OPS_AUTO_OOB ? mtd->oobavail : mtd->oobsize;
+}
+
 int mtd_erase(struct mtd_info *mtd, struct erase_info *instr);
 #ifndef __UBOOT__
 int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,