Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6a6da17 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

mtd: use mtd_set_ecclayout() where appropriate



Use the mtd_set_ecclayout() helper instead of directly assigning the
mtd->ecclayout field.

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent 036d6543
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -777,7 +777,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c

	}

	concat->mtd.ecclayout = subdev[0]->ecclayout;
	mtd_set_ecclayout(&concat->mtd, subdev[0]->ecclayout);

	concat->num_subdev = num_devs;
	concat->mtd.name = name;
+1 −1
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
			part->name);
	}

	slave->mtd.ecclayout = master->ecclayout;
	mtd_set_ecclayout(&slave->mtd, master->ecclayout);
	slave->mtd.ecc_step_size = master->ecc_step_size;
	slave->mtd.ecc_strength = master->ecc_strength;
	slave->mtd.bitflip_threshold = master->bitflip_threshold;