mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 09:12:39 +00:00
fa04682f21
Remove various hacks for fast read, un-break device tree support Signed-off-by: Felix Fietkau <nbd@nbd.name>
16 lines
342 B
Diff
16 lines
342 B
Diff
--- 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);
|