-diff -urN linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c linux-2.6.21.1.dev/drivers/mtd/devices/block2mtd.c
---- linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c 2007-04-27 23:49:26.000000000 +0200
-+++ linux-2.6.21.1.dev/drivers/mtd/devices/block2mtd.c 2007-05-26 20:06:13.547923960 +0200
+Index: linux-2.6.21.7/drivers/mtd/devices/block2mtd.c
+===================================================================
+--- linux-2.6.21.7.orig/drivers/mtd/devices/block2mtd.c
++++ linux-2.6.21.7/drivers/mtd/devices/block2mtd.c
@@ -16,6 +16,7 @@
#include <linux/list.h>
#include <linux/init.h>
#include <linux/buffer_head.h>
#include <linux/mutex.h>
#include <linux/mount.h>
-@@ -288,10 +289,11 @@
+@@ -288,10 +289,11 @@ static void block2mtd_free_device(struct
/* FIXME: ensure that mtd->size % erase_size == 0 */
if (!devname)
return NULL;
-@@ -330,14 +332,18 @@
+@@ -330,14 +332,18 @@ static struct block2mtd_dev *add_device(
/* Setup the MTD structure */
/* make the name contain the block device in */
dev->mtd.erasesize = erase_size;
dev->mtd.writesize = 1;
dev->mtd.type = MTD_RAM;
-@@ -349,15 +355,18 @@
+@@ -349,15 +355,18 @@ static struct block2mtd_dev *add_device(
dev->mtd.read = block2mtd_read;
dev->mtd.priv = dev;
dev->mtd.owner = THIS_MODULE;
return dev;
devinit_err:
-@@ -430,9 +439,9 @@
+@@ -430,9 +439,9 @@ static __initdata char block2mtd_paramli
static int block2mtd_setup2(const char *val)
{
char *name;
size_t erase_size = PAGE_SIZE;
int i, ret;
-@@ -443,7 +452,7 @@
+@@ -443,7 +452,7 @@ static int block2mtd_setup2(const char *
strcpy(str, val);
kill_final_newline(str);
token[i] = strsep(&str, ",");
if (str)
-@@ -463,8 +472,10 @@
+@@ -463,8 +472,10 @@ static int block2mtd_setup2(const char *
parse_err("illegal erase size");
}
}
return 0;
}
-@@ -498,7 +509,7 @@
+@@ -498,7 +509,7 @@ static int block2mtd_setup(const char *v
module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);