mtd: initialize writebufsize in the MTD object of a partition

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Jan 6 10:59:05 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=7fa33ac0a7e24a1b8bd71be5c47a17423c62fbda
Commit:     7fa33ac0a7e24a1b8bd71be5c47a17423c62fbda
Parent:     25dcd29786d3fbd5751dc3c5b8109d930ea2d312
Author:     Anatolij Gustschin <agust at denx.de>
AuthorDate: Thu Dec 16 23:42:18 2010 +0100
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Jan 6 15:35:58 2011 +0000

    mtd: initialize writebufsize in the MTD object of a partition
    
    Propagate the writebufsize to the partition's MTD object so
    that UBI can set correct value for it's minimal I/O size
    using the writebufsize field of MTD object of the partition.
    
    By previous patches we added proper writebufsize field
    initialization. Next patch can now change UBI to use
    this field for setting the minimal I/O size.
    
    Signed-off-by: Anatolij Gustschin <agust at denx.de>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/mtdconcat.c |    1 +
 drivers/mtd/mtdpart.c   |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index bf8de09..5f5777b 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -776,6 +776,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],	/* subdevices to c
 	concat->mtd.size = subdev[0]->size;
 	concat->mtd.erasesize = subdev[0]->erasesize;
 	concat->mtd.writesize = subdev[0]->writesize;
+	concat->mtd.writebufsize = subdev[0]->writebufsize;
 	concat->mtd.subpage_sft = subdev[0]->subpage_sft;
 	concat->mtd.oobsize = subdev[0]->oobsize;
 	concat->mtd.oobavail = subdev[0]->oobavail;
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 1047ff0..b910a37 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -384,6 +384,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
 	slave->mtd.flags = master->flags & ~part->mask_flags;
 	slave->mtd.size = part->size;
 	slave->mtd.writesize = master->writesize;
+	slave->mtd.writebufsize = master->writebufsize;
 	slave->mtd.oobsize = master->oobsize;
 	slave->mtd.oobavail = master->oobavail;
 	slave->mtd.subpage_sft = master->subpage_sft;



More information about the linux-mtd-cvs mailing list