diff options
Diffstat (limited to 'target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch')
-rw-r--r-- | target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch b/target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch index 6981c6d943..a84af43a29 100644 --- a/target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch +++ b/target/linux/generic/pending-5.4/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch @@ -11,26 +11,12 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1457,7 +1457,7 @@ static int spi_nor_write(struct mtd_info +@@ -2704,7 +2704,7 @@ static int spi_nor_write(struct mtd_info write_enable(nor); - ret = nor->write(nor, addr, page_remain, buf + i); + ret = spi_nor_write_data(nor, addr, page_remain, buf + i); - if (ret < 0) + if (ret <= 0) goto write_err; written = ret; -@@ -1466,13 +1466,6 @@ static int spi_nor_write(struct mtd_info - goto write_err; - *retlen += written; - i += written; -- if (written != page_remain) { -- dev_err(nor->dev, -- "While writing %zu bytes written %zd bytes\n", -- page_remain, written); -- ret = -EIO; -- goto write_err; -- } - } - - write_err: |