diff options
author | Michal Suchanek <hramrach@gmail.com> | 2016-05-06 02:31:53 +0200 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-06-02 02:22:52 +0200 |
commit | 2dd087b16946cf168f401526adf26afa771bb740 (patch) | |
tree | 452867f0d3e8030e92b057ce130f0633f12eb20c /drivers/mtd/spi-nor/nxp-spifi.c | |
parent | mtd: spi-nor: check return value from write (diff) | |
download | linux-2dd087b16946cf168f401526adf26afa771bb740.tar.xz linux-2dd087b16946cf168f401526adf26afa771bb740.zip |
mtd: spi-nor: stop passing around retlen
Do not pass retlen to hardware driver read/write functions. Update it in
spi-nor generic driver instead.
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>
Diffstat (limited to 'drivers/mtd/spi-nor/nxp-spifi.c')
-rw-r--r-- | drivers/mtd/spi-nor/nxp-spifi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/spi-nor/nxp-spifi.c b/drivers/mtd/spi-nor/nxp-spifi.c index b0fb86996b8f..73a14f40928b 100644 --- a/drivers/mtd/spi-nor/nxp-spifi.c +++ b/drivers/mtd/spi-nor/nxp-spifi.c @@ -173,7 +173,7 @@ static int nxp_spifi_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) } static ssize_t nxp_spifi_read(struct spi_nor *nor, loff_t from, size_t len, - size_t *retlen, u_char *buf) + u_char *buf) { struct nxp_spifi *spifi = nor->priv; int ret; @@ -183,13 +183,12 @@ static ssize_t nxp_spifi_read(struct spi_nor *nor, loff_t from, size_t len, return ret; memcpy_fromio(buf, spifi->flash_base + from, len); - *retlen += len; return len; } static ssize_t nxp_spifi_write(struct spi_nor *nor, loff_t to, size_t len, - size_t *retlen, const u_char *buf) + const u_char *buf) { struct nxp_spifi *spifi = nor->priv; u32 cmd; @@ -201,7 +200,6 @@ static ssize_t nxp_spifi_write(struct spi_nor *nor, loff_t to, size_t len, return ret; writel(to, spifi->io_base + SPIFI_ADDR); - *retlen += len; cmd = SPIFI_CMD_DOUT | SPIFI_CMD_DATALEN(len) | |