mtd: spi-nor: Pointer parameter for SR in spi_nor_read_sr()
authorTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 24 Oct 2019 12:55:34 +0000 (15:55 +0300)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 1 Nov 2019 07:33:26 +0000 (09:33 +0200)
commitcd1718f5c49d53539c99f45a485ca0e0ac7f0a99
tree7ce494c0de1f700661e4b35110ff8dce4fc69dec
parent7380f79c111cf90481869f83986c355b403faf59
mtd: spi-nor: Pointer parameter for SR in spi_nor_read_sr()

Let the callers pass the pointer to the DMA-able buffer where
the value of the Status Register will be written. This way we
avoid the casts between int and u8, which can be confusing.

Callers stop compare the return value of spi_nor_read_sr() with negative,
spi_nor_read_sr() returns 0 on success and -errno otherwise.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
drivers/mtd/spi-nor/spi-nor.c