aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-02-03 02:53:28 -0500
committerLuis Henriques <luis.henriques@canonical.com>2012-05-01 05:59:55 -0400
commit8df465456d9aa72780a89839939568e03a9cb3a7 (patch)
tree17b37342876a1f65b1d4df720cb80d332c775809 /drivers/mtd
parent3400416b3b97d5af011c84ad0b89dc5257ad3fbc (diff)
mtd: lart: initialize writebufsize
BugLink: http://bugs.launchpad.net/bugs/983326 commit fcc44a07dae0af16e84e93425fc8afe642ddc603 upstream. The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. Set writebufsize to 4 because this drivers writes at max 4 bytes at a time. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/lart.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/devices/lart.c b/drivers/mtd/devices/lart.c
index 772a0ff89e0..09d5b5aaea5 100644
--- a/drivers/mtd/devices/lart.c
+++ b/drivers/mtd/devices/lart.c
@@ -636,6 +636,7 @@ static int __init lart_flash_init (void)
636 mtd.name = module_name; 636 mtd.name = module_name;
637 mtd.type = MTD_NORFLASH; 637 mtd.type = MTD_NORFLASH;
638 mtd.writesize = 1; 638 mtd.writesize = 1;
639 mtd.writebufsize = 4;
639 mtd.flags = MTD_CAP_NORFLASH; 640 mtd.flags = MTD_CAP_NORFLASH;
640 mtd.size = FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM + FLASH_BLOCKSIZE_MAIN * FLASH_NUMBLOCKS_16m_MAIN; 641 mtd.size = FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM + FLASH_BLOCKSIZE_MAIN * FLASH_NUMBLOCKS_16m_MAIN;
641 mtd.erasesize = FLASH_BLOCKSIZE_MAIN; 642 mtd.erasesize = FLASH_BLOCKSIZE_MAIN;