Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: spi-nor: Fix direction of the write_sr() transfer

write_sr() sends data to the SPI memory, fix the direction.

Fixes: b35b9a10362d ("mtd: spi-nor: Move m25p80 code in spi-nor.c")
Reported-by: John Garry <john.garry@huawei.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Tested-by: John Garry <john.garry@huawei.com>
Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

authored by

Tudor Ambarus and committed by
Miquel Raynal
41e086e1 54ecb8f7

+1 -1
+1 -1
drivers/mtd/spi-nor/spi-nor.c
··· 487 487 SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR, 1), 488 488 SPI_MEM_OP_NO_ADDR, 489 489 SPI_MEM_OP_NO_DUMMY, 490 - SPI_MEM_OP_DATA_IN(1, nor->bouncebuf, 1)); 490 + SPI_MEM_OP_DATA_OUT(1, nor->bouncebuf, 1)); 491 491 492 492 return spi_mem_exec_op(nor->spimem, &op); 493 493 }