projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
drivers: spi: consider command bytes when sending transfers
[oweals/u-boot.git]
/
drivers
/
mtd
/
spi
/
spi_flash.c
diff --git
a/drivers/mtd/spi/spi_flash.c
b/drivers/mtd/spi/spi_flash.c
index e40e1c01deb369727ac5b820b00c7c643ae9b25e..294d9f9d79c6eb123dec396bd56fac801d8da860 100644
(file)
--- a/
drivers/mtd/spi/spi_flash.c
+++ b/
drivers/mtd/spi/spi_flash.c
@@
-405,7
+405,7
@@
int spi_flash_cmd_write_ops(struct spi_flash *flash, u32 offset,
if (spi->max_write_size)
chunk_len = min(chunk_len,
-
(size_t)spi->max_write_size
);
+
spi->max_write_size - sizeof(cmd)
);
spi_flash_addr(write_addr, cmd);