aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-05-23 18:17:23 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-06-01 15:23:19 -0400
commit2e24e32e2759348c9290404abad4f729f791bfad (patch)
tree2f6d61442a8fdf6e084c4f690569ddc6fc3c012c /drivers/mtd/devices
parent5636ce0f070dee85c1b1203fe436a89648d25d06 (diff)
mtd: block2mtd: fix recursive call of mtd_writev
The 'mtd_writev' interface calls the function assigned to the '_write' field of a given mtd device if that is not NULL. The block2mtd driver sets the '_writev' field to the 'mtd_writev' function itself and thus causes a endless loop. This is caused by 1dbebd32562b3c2caeca35960e5cb00bfcc12900 (mtd: harmonize mtd_writev usage). Remove the assignment from the block2mtd driver to fix the issue. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: stable@kernel.org [3.3+] Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/block2mtd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 300aeb837ee3..681e2ee0f2d6 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -265,7 +265,6 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
265 dev->mtd.flags = MTD_CAP_RAM; 265 dev->mtd.flags = MTD_CAP_RAM;
266 dev->mtd._erase = block2mtd_erase; 266 dev->mtd._erase = block2mtd_erase;
267 dev->mtd._write = block2mtd_write; 267 dev->mtd._write = block2mtd_write;
268 dev->mtd._writev = mtd_writev;
269 dev->mtd._sync = block2mtd_sync; 268 dev->mtd._sync = block2mtd_sync;
270 dev->mtd._read = block2mtd_read; 269 dev->mtd._read = block2mtd_read;
271 dev->mtd.priv = dev; 270 dev->mtd.priv = dev;