summaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/patches-3.3/010-backport_ixp4xx_mtd_fix.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-04-13 13:38:49 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-04-13 13:38:49 +0000
commit2ff0c7f1293de3427c2e137f028dbe0b18323adc (patch)
treea2b618eb9f4715f4a9715f84097059569d689657 /target/linux/ixp4xx/patches-3.3/010-backport_ixp4xx_mtd_fix.patch
parent549a939951db53100584a5ed464552a0fd4292d7 (diff)
ixp4xx: add support for linux 3.3.1
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31275 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ixp4xx/patches-3.3/010-backport_ixp4xx_mtd_fix.patch')
-rw-r--r--target/linux/ixp4xx/patches-3.3/010-backport_ixp4xx_mtd_fix.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/patches-3.3/010-backport_ixp4xx_mtd_fix.patch b/target/linux/ixp4xx/patches-3.3/010-backport_ixp4xx_mtd_fix.patch
new file mode 100644
index 000000000..426714f93
--- /dev/null
+++ b/target/linux/ixp4xx/patches-3.3/010-backport_ixp4xx_mtd_fix.patch
@@ -0,0 +1,43 @@
+commit a3c1e3b732b3708a80e4035b9d845f3f7c7dd0c9
+Author: Marc Kleine-Budde <mkl@blackshift.org>
+Date: Wed Feb 8 20:24:29 2012 +0100
+
+ mtd: ixp4xx: oops in ixp4xx_flash_probe
+
+ In commit "c797533 mtd: abstract last MTD partition parser argument" the
+ third argument of "mtd_device_parse_register()" changed from start address
+ of the MTD device to a pointer to a struct.
+
+ The "ixp4xx_flash_probe()" function was not converted properly, causing
+ an oops during boot.
+
+ This patch fixes the problem by filling the needed information into a
+ "struct mtd_part_parser_data" and passing it to
+ "mtd_device_parse_register()".
+
+ Signed-off-by: Marc Kleine-Budde <mkl@blackshift.org>
+ Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+ Cc: stable@kernel.org [3.2+]
+ Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+
+--- a/drivers/mtd/maps/ixp4xx.c
++++ b/drivers/mtd/maps/ixp4xx.c
+@@ -182,6 +182,9 @@ static int ixp4xx_flash_probe(struct pla
+ {
+ struct flash_platform_data *plat = dev->dev.platform_data;
+ struct ixp4xx_flash_info *info;
++ struct mtd_part_parser_data ppdata = {
++ .origin = dev->resource->start,
++ };
+ int err = -1;
+
+ if (!plat)
+@@ -247,7 +250,7 @@ static int ixp4xx_flash_probe(struct pla
+ /* Use the fast version */
+ info->map.write = ixp4xx_write16;
+
+- err = mtd_device_parse_register(info->mtd, probes, dev->resource->start,
++ err = mtd_device_parse_register(info->mtd, probes, &ppdata,
+ plat->parts, plat->nr_parts);
+ if (err) {
+ printk(KERN_ERR "Could not parse partitions\n");