Skip to content

Commit 41e086e

Browse files
ambarusmiquelraynal
authored andcommitted
mtd: spi-nor: Fix direction of the write_sr() transfer
write_sr() sends data to the SPI memory, fix the direction. Fixes: b35b9a1 ("mtd: spi-nor: Move m25p80 code in spi-nor.c") Reported-by: John Garry <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Tested-by: John Garry <[email protected]> Acked-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
1 parent 54ecb8f commit 41e086e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/spi-nor/spi-nor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ static int write_sr(struct spi_nor *nor, u8 val)
487487
SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR, 1),
488488
SPI_MEM_OP_NO_ADDR,
489489
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));
491491

492492
return spi_mem_exec_op(nor->spimem, &op);
493493
}

0 commit comments

Comments
 (0)