aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/patches-4.4/460-m25p80-spi-read-flash-check.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-12-08 21:10:50 +0100
committerFelix Fietkau <nbd@nbd.name>2016-12-12 10:22:17 +0100
commitfa04682f213f81840ca17022ca5aa9439bc22f2c (patch)
tree7df5bbad4ef622683414f6b1aa4f084845e0fbf3 /target/linux/ar71xx/patches-4.4/460-m25p80-spi-read-flash-check.patch
parent52c7375c134afd204f6ac9d46265f77f7800123c (diff)
downloadupstream-fa04682f213f81840ca17022ca5aa9439bc22f2c.tar.gz
upstream-fa04682f213f81840ca17022ca5aa9439bc22f2c.tar.bz2
upstream-fa04682f213f81840ca17022ca5aa9439bc22f2c.zip
ar71xx: clean up spi controller related patches
Remove various hacks for fast read, un-break device tree support Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/ar71xx/patches-4.4/460-m25p80-spi-read-flash-check.patch')
-rw-r--r--target/linux/ar71xx/patches-4.4/460-m25p80-spi-read-flash-check.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-4.4/460-m25p80-spi-read-flash-check.patch b/target/linux/ar71xx/patches-4.4/460-m25p80-spi-read-flash-check.patch
new file mode 100644
index 0000000000..a34b38398d
--- /dev/null
+++ b/target/linux/ar71xx/patches-4.4/460-m25p80-spi-read-flash-check.patch
@@ -0,0 +1,15 @@
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -149,8 +149,10 @@ static int m25p80_read(struct spi_nor *n
+ msg.data_nbits = m25p80_rx_nbits(nor);
+
+ ret = spi_flash_read(spi, &msg);
+- *retlen = msg.retlen;
+- return ret;
++ if (!ret) {
++ *retlen = msg.retlen;
++ return 0;
++ }
+ }
+
+ spi_message_init(&m);