mtd: spi-nor: Pointer parameter for FSR in spi_nor_read_fsr()
authorTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 24 Oct 2019 13:40:13 +0000 (16:40 +0300)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 1 Nov 2019 07:33:51 +0000 (09:33 +0200)
commit5ce1b49ccb52fc3dd5679d8c523a3e8b5c812fb0
tree51308e0332844ff2795e9c30b003de919d466556
parentcd1718f5c49d53539c99f45a485ca0e0ac7f0a99
mtd: spi-nor: Pointer parameter for FSR in spi_nor_read_fsr()

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

Caller stops compare the return value of spi_nor_read_fsr() with negative,
spi_nor_read_fsr() 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