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: NBoris Brezillon <boris.brezillon@free-electrons.com>
上级 d30aae6d
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部