]> git.karo-electronics.de Git - linux-beck.git/commit
mtd: spi-nor: change return value of read/write
authorMichal Suchanek <hramrach@gmail.com>
Fri, 6 May 2016 00:31:47 +0000 (17:31 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 2 Jun 2016 00:22:28 +0000 (17:22 -0700)
commit59451e1233bd315c5379a631838a03d80e689581
treede1e470748fc0889960466435abb6f672d311ca1
parentbecc7ae544c61395b5eba7b9913e14aa567ca07a
mtd: spi-nor: change return value of read/write

Change the return value of spi-nor device read and write methods to
allow returning amount of data transferred and errors as
read(2)/write(2) does.

Also, start handling positive returns in spi_nor_read(), since we want
to convert drivers to start returning the read-length both via *retlen
and the return code. (We don't need to do the same transition process
for spi_nor_write(), since ->write() didn't used to have a return code
at all.)

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Michal Suchanek <hramrach@gmail.com>
Tested-by: Michal Suchanek <hramrach@gmail.com>
drivers/mtd/devices/m25p80.c
drivers/mtd/spi-nor/fsl-quadspi.c
drivers/mtd/spi-nor/mtk-quadspi.c
drivers/mtd/spi-nor/nxp-spifi.c
drivers/mtd/spi-nor/spi-nor.c
include/linux/mtd/spi-nor.h