From: Boris Brezillon Date: Wed, 3 Feb 2016 17:53:44 +0000 (+0100) Subject: mtd: add mtd_set_ecclayout() helper function X-Git-Tag: v4.7-rc1~28^2~4^2~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=036d6543f85319ffe96afad6de73d3a220917a63;p=platform%2Fkernel%2Flinux-exynos.git 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 --- diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 117ca1f..e62da84 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, int mtd_ooblayout_count_freebytes(struct mtd_info *mtd); int mtd_ooblayout_count_eccbytes(struct mtd_info *mtd); +static inline void mtd_set_ecclayout(struct mtd_info *mtd, + struct nand_ecclayout *ecclayout) +{ + mtd->ecclayout = ecclayout; +} + static inline void mtd_set_of_node(struct mtd_info *mtd, struct device_node *np) {