mtd: nand: use mtd_set_ecclayout() where appropriate
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 3 Feb 2016 19:13:50 +0000 (20:13 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 19 Apr 2016 20:05:54 +0000 (22:05 +0200)
Use the mtd_set_ecclayout() helper instead of directly assigning the
mtd->ecclayout field.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/nand_base.c

index 24ed4450df570ce714856e8edc98a5bc24ab1f23..feb1448e9dd6a14b0c1dd6bd2a77b8016bd5dbbd 100644 (file)
@@ -4285,7 +4285,7 @@ int nand_scan_tail(struct mtd_info *mtd)
                ecc->write_oob_raw = ecc->write_oob;
 
        /* propagate ecc info to mtd_info */
-       mtd->ecclayout = ecc->layout;
+       mtd_set_ecclayout(mtd, ecc->layout);
        mtd->ecc_strength = ecc->strength;
        mtd->ecc_step_size = ecc->size;