diff options
| author | Scott Wood <[email protected]> | 2016-05-30 13:57:58 -0500 |
|---|---|---|
| committer | Scott Wood <[email protected]> | 2016-06-03 20:27:48 -0500 |
| commit | ceee07b65875bb01bef55cba06940ef7afc1afba (patch) | |
| tree | 114c79852874d1970e91ff76f80835ce25038baa /include/linux/mtd/mtd.h | |
| parent | 81c772521ff26054a3fe75efa87d8daeae83e9b4 (diff) | |
mtd: nand: Sync with Linux v4.6
Updates the NAND code to match Linux v4.6. The previous sync was from
Linux v4.1 in commit d3963721d93fafa.
Note that none of the individual NAND drivers tracked Linux closely
enough to be synced themselves, other than manually applying a few
cross-tree changes.
Signed-off-by: Scott Wood <[email protected]>
Tested-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'include/linux/mtd/mtd.h')
| -rw-r--r-- | include/linux/mtd/mtd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 9da77ec1441..cf20674549c 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -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, |
