aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2016-08-09 11:23:32 +0200
committerJonas Gorski <jonas.gorski@gmail.com>2016-08-13 15:49:35 +0200
commit0ddae04c226983e1e064d8750b8bb8724f077ad9 (patch)
tree84f901cf5188629c2bd08d24c9cf743d29f01497 /target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch
parent86ec4104181992400363e5602c11079e79524d9c (diff)
downloadupstream-0ddae04c226983e1e064d8750b8bb8724f077ad9.tar.gz
upstream-0ddae04c226983e1e064d8750b8bb8724f077ad9.tar.bz2
upstream-0ddae04c226983e1e064d8750b8bb8724f077ad9.zip
brcm63xx: backport mtd of node changes from upstream
Should fix parser data containing uninitialized values for of probed physmap flashes, which could break e.g. the redboot parser. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch')
-rw-r--r--target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch20
1 files changed, 10 insertions, 10 deletions
diff --git a/target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch b/target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch
index bbb565e9db..a0b4b4ff36 100644
--- a/target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch
+++ b/target/linux/brcm63xx/patches-4.4/414-MTD-m25p80-allow-passing-pp_data.patch
@@ -4,22 +4,22 @@ Date: Tue, 1 May 2012 17:33:03 +0200
Subject: [PATCH 64/79] MTD: m25p80: allow passing pp_data
---
- drivers/mtd/devices/m25p80.c | 3 +++
+ drivers/mtd/devices/m25p80.c | 5 +++--
include/linux/spi/flash.h | 2 ++
2 files changed, 5 insertions(+)
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
-@@ -272,6 +272,9 @@ static int m25p_probe(struct spi_device
- if (data)
- flash->max_transfer_len = data->max_transfer_len;
-
-+ if (data && data->pp_data)
-+ memcpy(&ppdata, data->pp_data, sizeof(ppdata));
-+
- ret = spi_nor_scan(nor, flash_name, mode);
- if (ret)
+@@ -276,7 +276,8 @@ static int m25p_probe(struct spi_device
return ret;
+
+ return mtd_device_parse_register(&nor->mtd,
+- data ? data->part_probe_types : NULL, NULL,
++ data ? data->part_probe_types : NULL,
++ data ? data->pp_data : NULL,
+ data ? data->parts : NULL,
+ data ? data->nr_parts : 0);
+ }
--- a/include/linux/spi/flash.h
+++ b/include/linux/spi/flash.h
@@ -12,6 +12,7 @@ struct mtd_part_parser_data;