mtd/drivers/mtd/devices block2mtd.c,1.20,1.21

joern at infradead.org joern at infradead.org
Wed Dec 22 08:16:25 EST 2004


Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/home/joern/mtd/drivers/mtd/devices

Modified Files:
	block2mtd.c 
Log Message:
For block devices, an erase size of 0 makes little sense.  PAGE_SIZE 
should be a sane default.



Index: block2mtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/block2mtd.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- block2mtd.c	22 Dec 2004 13:14:19 -0000	1.20
+++ block2mtd.c	22 Dec 2004 13:16:22 -0000	1.21
@@ -38,7 +38,6 @@
 
 
 /* Default erase size in K, always make it a multiple of PAGE_SIZE */
-#define CONFIG_MTD_BLKDEV_ERASESIZE (128 << 10)	/* 128KiB */
 #define VERSION "$Revision$"
 
 /* Info for the block device */
@@ -290,7 +289,6 @@
 	if (!dev)
 		return;
 
-	kfree(dev->mtd.eraseregions);
 	kfree(dev->mtd.name);
 
 	if (dev->blkdev) {
@@ -432,7 +430,7 @@
 	char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */
 	char *token[2];
 	char *name;
-	size_t erase_size = 0;
+	size_t erase_size = PAGE_SIZE;
 	int i, ret;
 
 	if (strnlen(val, sizeof(buf)) >= sizeof(buf))





More information about the linux-mtd-cvs mailing list