]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit27db97d1ed9693791d06a4c0bc193a0fdc3091fe
tree7ce494c0de1f700661e4b35110ff8dce4fc69dec
parent81aba215572e0b0d37b9d160b3870e2d5fd3b5c1
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