mtd: add mtd_set_ecclayout() helper function
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon May 23 21:59:13 PDT 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=036d6543f85319ffe96afad6de73d3a220917a63
Commit: 036d6543f85319ffe96afad6de73d3a220917a63
Parent: d30aae6d5630c27fa461f9da9ba2f40ae59e3287
Author: Boris Brezillon <boris.brezillon at free-electrons.com>
AuthorDate: Wed Feb 3 18:53:44 2016 +0100
Committer: Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Tue Apr 19 22:05:53 2016 +0200
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 at free-electrons.com>
---
include/linux/mtd/mtd.h | 6 ++++++
1 file changed, 6 insertions(+)
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)
{
More information about the linux-mtd-cvs
mailing list