]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mtd: nand: jz4780: Use mtd_set_ooblayout() to set the ooblayout
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 2 May 2017 10:29:13 +0000 (12:29 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 15 May 2017 10:00:36 +0000 (12:00 +0200)
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@free-electrons.com>
Acked-by: Harvey Hunt <harveyhuntnexus@gmail.com>
drivers/mtd/nand/jz4780_nand.c

index a39bb70175eea230cab2c3797f4750f075cfa755..8bc835f71b26683f8ef42e5f90da2f05f3c3ee61 100644 (file)
@@ -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;
 }