mtd: docg3: use mtd_set_ecclayout() where appropriate
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 3 Feb 2016 19:14:14 +0000 (20:14 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 19 Apr 2016 20:05:55 +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>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
drivers/mtd/devices/docg3.c

index e7b2e439696c851298c21775a3117fd59811fbf1..6b516e14264b444e024792a17e3c233c44e9fac9 100644 (file)
@@ -1857,7 +1857,7 @@ static int __init doc_set_driver_info(int chip_id, struct mtd_info *mtd)
        mtd->_read_oob = doc_read_oob;
        mtd->_write_oob = doc_write_oob;
        mtd->_block_isbad = doc_block_isbad;
-       mtd->ecclayout = &docg3_oobinfo;
+       mtd_set_ecclayout(mtd, &docg3_oobinfo);
        mtd->oobavail = 8;
        mtd->ecc_strength = DOC_ECC_BCH_T;