]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
mtd: use mtd_set_ecclayout() where appropriate
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 3 Feb 2016 19:13:26 +0000 (20:13 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 19 Apr 2016 20:05:53 +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/mtdconcat.c
drivers/mtd/mtdpart.c

index 239a8c806b6772df642bf6cb1385616147e975c8..481565e5fbaaa87b25924e7ee57e2c9ce1563ca8 100644 (file)
@@ -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;
index 08de4b2cf0f5ec291ba4bfe9e43b8f8d083c0bbd..f53d9d72b23ae683aeabf562b28e2e63dd00e1a2 100644 (file)
@@ -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;