mtd: spi-nor: Pointer parameter for CR in spi_nor_read_cr()
authorTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 24 Oct 2019 13:59:55 +0000 (16:59 +0300)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 1 Nov 2019 08:20:36 +0000 (10:20 +0200)
commitb662d398ccf114a80c92140287a6507efb3e2dfc
treeafa94397dd5d7b5202a9151b5b4710235e73c6d7
parent5ce1b49ccb52fc3dd5679d8c523a3e8b5c812fb0
mtd: spi-nor: Pointer parameter for CR in spi_nor_read_cr()

Let the callers pass the pointer to the DMA-able buffer where
the value of the Configuration 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_cr() with negative,
spi_nor_read_cr() 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