packagegroup-opendreambox-essential: move to meta-opendreambox
[opendreambox.git] / meta-bsp / common / recipes / linux / linux-dreambox-3.2 / 0006-mtd-block2mtd-fix-recursive-call-of-mtd_writev.patch
1 From e5dde25832b2e175eb1787ad62bb03b7caf43b10 Mon Sep 17 00:00:00 2001
2 From: Andreas Monzner <andreas.monzner@dream-property.net>
3 Date: Wed, 20 Mar 2013 17:19:03 +0100
4 Subject: [PATCH 06/17] mtd: block2mtd: fix recursive call of mtd_writev
5
6 The 'mtd_writev' interface calls the function assigned
7 to the 'write' field of a given mtd device if that is
8 not NULL. The block2mtd driver sets the 'writev' field
9 to the 'default_mtd_writev' function itself and thus causes a
10 endless loop.
11
12 This is caused by 1dbebd32562b3c2caeca35960e5cb00bfcc12900
13 (mtd: harmonize mtd_writev usage).
14
15 Remove the assignment from the block2mtd driver to fix the
16 issue.
17
18 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
19 Cc: stable@kernel.org [3.3+]
20 Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
21 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
22
23 Conflicts:
24         drivers/mtd/devices/block2mtd.c
25 ---
26  drivers/mtd/devices/block2mtd.c | 1 -
27  1 file changed, 1 deletion(-)
28
29 diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
30 index f95c0c5..67d8b49 100644
31 --- a/drivers/mtd/devices/block2mtd.c
32 +++ b/drivers/mtd/devices/block2mtd.c
33 @@ -290,7 +290,6 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size, int write
34         dev->mtd.flags = MTD_CAP_RAM;
35         dev->mtd.erase = block2mtd_erase;
36         dev->mtd.write = block2mtd_write;
37 -       dev->mtd.writev = default_mtd_writev;
38         dev->mtd.sync = block2mtd_sync;
39         dev->mtd.read = block2mtd_read;
40         dev->mtd.priv = dev;
41 -- 
42 1.8.1.2
43