mtd: onenand: use mtd_set_ecclayout() where appropriate
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 3 Feb 2016 19:14:03 +0000 (20:14 +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/onenand/onenand_base.c

index 20fdf8cceae97c375665a8bc4377319863a7129a..d0fa505d40bdd3f6c7ae7dc2b91b72e760d598d9 100644 (file)
@@ -3997,7 +3997,7 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
 
        mtd->oobavail = ret;
 
-       mtd->ecclayout = this->ecclayout;
+       mtd_set_ecclayout(mtd, this->ecclayout);
        mtd->ecc_strength = 1;
 
        /* Fill in remaining MTD driver data */