mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Jul 13 10:59:10 PDT 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=0b2f93dc0099e3b8a739b8918eeb995e12520940
Commit:     0b2f93dc0099e3b8a739b8918eeb995e12520940
Parent:     6f9ad5f360e865cba263109cb186cb2e16dbdc8d
Author:     Boris Brezillon <boris.brezillon at free-electrons.com>
AuthorDate: Tue May 2 12:29:13 2017 +0200
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Mon May 15 12:00:36 2017 +0200

    mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout
    
    The mtd_set_ooblayout() accesor has been added to hide internals of
    mtd_info and ease future refactoring. Call mtd_set_ooblayout() instead of
    directly accessing mtd->ooblayout.
    
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Acked-by: Harvey Hunt <harveyhuntnexus at gmail.com>
---
 drivers/mtd/nand/jz4780_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/jz4780_nand.c b/drivers/mtd/nand/jz4780_nand.c
index a39bb70..8bc835f 100644
--- a/drivers/mtd/nand/jz4780_nand.c
+++ b/drivers/mtd/nand/jz4780_nand.c
@@ -205,7 +205,7 @@ static int jz4780_nand_init_ecc(struct jz4780_nand_chip *nand, struct device *de
 		return -EINVAL;
 	}
 
-	mtd->ooblayout = &nand_ooblayout_lp_ops;
+	mtd_set_ooblayout(mtd, &nand_ooblayout_lp_ops);
 
 	return 0;
 }



More information about the linux-mtd-cvs mailing list