Skip to content

Commit

Permalink
mtd: spi-nor: Fix direction of the write_sr() transfer
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Tudor Ambarus authored and Miquel Raynal committed Oct 4, 2019
1 parent 54ecb8f commit 41e086e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/spi-nor/spi-nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ static int write_sr(struct spi_nor *nor, u8 val)
SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR, 1),
SPI_MEM_OP_NO_ADDR,
SPI_MEM_OP_NO_DUMMY,
SPI_MEM_OP_DATA_IN(1, nor->bouncebuf, 1));
SPI_MEM_OP_DATA_OUT(1, nor->bouncebuf, 1));

return spi_mem_exec_op(nor->spimem, &op);
}
Expand Down

0 comments on commit 41e086e

Please sign in to comment.