From: Brian Norris Date: Tue, 31 Jan 2012 08:06:03 +0000 (-0800) Subject: mtd: m25p80: set writebufsize X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b54f47c8bcfc5f766bf13ec31bd7dd1d4726d33b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mtd: m25p80: set writebufsize Using UBI on m25p80 can give messages like: UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit We need to initialize writebufsize; I think "page_size" is the correct "bufsize", although I'm not sure. Comments? Signed-off-by: Brian Norris Signed-off-by: Artem Bityutskiy Cc: stable@kernel.org [2.6.38+] Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index f83e4d0366cc..8808da9ee31f 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -932,6 +932,7 @@ static int __devinit m25p_probe(struct spi_device *spi) ppdata.of_node = spi->dev.of_node; flash->mtd.dev.parent = &spi->dev; flash->page_size = info->page_size; + flash->mtd.writebufsize = flash->page_size; if (info->addr_width) flash->addr_width = info->addr_width;