From: Boris Brezillon Date: Wed, 3 Feb 2016 19:14:03 +0000 (+0100) Subject: mtd: onenand: use mtd_set_ecclayout() where appropriate X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=eb8c2be581e0f6c98830bc9eee09905f9fefed32;p=openwrt%2Fstaging%2Fblogic.git mtd: onenand: use mtd_set_ecclayout() where appropriate Use the mtd_set_ecclayout() helper instead of directly assigning the mtd->ecclayout field. Signed-off-by: Boris Brezillon --- diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 20fdf8cceae9..d0fa505d40bd 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -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 */