lkml.org 
[lkml]   [2015]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/23] mtd: add mtd_set_ecclayout() helper function
Date
Add an mtd_set_ecclayout() helper function to avoid direct accesses to the
mtd->ecclayout field. This will ease future refactor of ECC layout
definition.

Signed-off-by: Boris Brezillon <boris.brezillon@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 25e3d0f..80e32fa 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -253,6 +253,12 @@ struct mtd_info {
int usecount;
};

+static inline void mtd_set_ecclayout(struct mtd_info *mtd,
+ struct nand_ecclayout *ecclayout)
+{
+ mtd->ecclayout = ecclayout;
+}
+
static inline int mtd_eccpos(struct mtd_info *mtd, int eccbyte)
{
if (!mtd->ecclayout)
--
2.1.4


\
 
 \ /
  Last update: 2015-12-07 23:41    [W:0.112 / U:9.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site