DataFlash & writesize

Andrew Victor andrew at sanpeople.com
Fri Jun 23 06:27:12 EDT 2006


hi,

> So, I'm asking you to initialize mtd->writesize correctly.

Since the writesize change is now in mainline git, here is a trivial
patch to set mtd->writesize for DataFlash.
[writesize = erasesize = pagesize]

(It compiles, but not tested).


Signed-off-by: Andrew Victor <andrew at sanpeople.com>


diff -urN linux-2.6.17-git5.orig/drivers/mtd/devices/mtd_dataflash.c linux-2.6.17-git5/drivers/mtd/devices/mtd_dataflash.c
--- linux-2.6.17-git5.orig/drivers/mtd/devices/mtd_dataflash.c	Tue May 30 11:41:52 2006
+++ linux-2.6.17-git5/drivers/mtd/devices/mtd_dataflash.c	Fri Jun 23 12:07:09 2006
@@ -478,6 +478,7 @@
 	device->name = (pdata && pdata->name) ? pdata->name : priv->name;
 	device->size = nr_pages * pagesize;
 	device->erasesize = pagesize;
+	device->writesize = pagesize;
 	device->owner = THIS_MODULE;
 	device->type = MTD_DATAFLASH;
 	device->flags = MTD_CAP_NORFLASH;







More information about the linux-mtd mailing list