Skip to content
Commit 59451e12 authored by Michal Suchanek's avatar Michal Suchanek Committed by Brian Norris
Browse files

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: default avatarMichal Suchanek <hramrach@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Tested-by Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: default avatarMichal Suchanek <hramrach@gmail.com>
Tested-by: default avatarMichal Suchanek <hramrach@gmail.com>
parent becc7ae5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment