diff options
Diffstat (limited to 'drivers/mtd/spi/spi-nor-core.c')
-rw-r--r-- | drivers/mtd/spi/spi-nor-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 24c6b8c4a3..d795ecbc9f 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -209,6 +209,9 @@ static int spi_nor_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) SPI_MEM_OP_NO_DUMMY, SPI_MEM_OP_DATA_OUT(len, NULL, 1)); + if (len == 0) + op.data.dir = SPI_MEM_NO_DATA; + return spi_nor_read_write_reg(nor, &op, buf); } |