diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-02-03 12:53:44 -0500 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-04-19 16:05:53 -0400 |
commit | 036d6543f85319ffe96afad6de73d3a220917a63 (patch) | |
tree | bcc502e548ac2ebab8a4b4273c05081470b12dc3 /include/linux/mtd | |
parent | d30aae6d5630c27fa461f9da9ba2f40ae59e3287 (diff) |
mtd: add mtd_set_ecclayout() helper function
Add an mtd_set_ecclayout() helper function to avoid direct accesses to the
mtd->ecclayout field. This will ease future reworks of ECC layout
definition.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/mtd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 117ca1ff581d..e62da8462493 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -286,6 +286,12 @@ int mtd_ooblayout_set_databytes(struct mtd_info *mtd, const u8 *databuf, | |||
286 | int mtd_ooblayout_count_freebytes(struct mtd_info *mtd); | 286 | int mtd_ooblayout_count_freebytes(struct mtd_info *mtd); |
287 | int mtd_ooblayout_count_eccbytes(struct mtd_info *mtd); | 287 | int mtd_ooblayout_count_eccbytes(struct mtd_info *mtd); |
288 | 288 | ||
289 | static inline void mtd_set_ecclayout(struct mtd_info *mtd, | ||
290 | struct nand_ecclayout *ecclayout) | ||
291 | { | ||
292 | mtd->ecclayout = ecclayout; | ||
293 | } | ||
294 | |||
289 | static inline void mtd_set_of_node(struct mtd_info *mtd, | 295 | static inline void mtd_set_of_node(struct mtd_info *mtd, |
290 | struct device_node *np) | 296 | struct device_node *np) |
291 | { | 297 | { |