Change the {read,write}_buf() helper prototypes to pass a davinci_nand_info object and match the types stored in nand_op_instr. Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> --- drivers/mtd/nand/raw/davinci_nand.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index c629e1a6ed71..29a785d426d3 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -382,11 +382,9 @@ static int nand_davinci_correct_4bit(struct nand_chip *chip, u_char *data, * the two LSBs for NAND access ... so we can issue 32-bit reads/writes * and have that transparently morphed into multiple NAND operations. */ -static void nand_davinci_read_buf(struct nand_chip *chip, uint8_t *buf, - int len) +static void nand_davinci_read_buf(struct davinci_nand_info *info, void *buf, + unsigned int len) { - struct davinci_nand_info *info = to_davinci_nand(nand_to_mtd(chip)); - if ((0x03 & ((uintptr_t)buf)) == 0 && (0x03 & len) == 0) ioread32_rep(info->current_cs, buf, len >> 2); else if ((0x01 & ((uintptr_t)buf)) == 0 && (0x01 & len) == 0) @@ -395,11 +393,9 @@ static void nand_davinci_read_buf(struct nand_chip *chip, uint8_t *buf, ioread8_rep(info->current_cs, buf, len); } -static void nand_davinci_write_buf(struct nand_chip *chip, const uint8_t *buf, - int len) +static void nand_davinci_write_buf(struct davinci_nand_info *info, + const void *buf, unsigned int len) { - struct davinci_nand_info *info = to_davinci_nand(nand_to_mtd(chip)); - if ((0x03 & ((uintptr_t)buf)) == 0 && (0x03 & len) == 0) iowrite32_rep(info->current_cs, buf, len >> 2); else if ((0x01 & ((uintptr_t)buf)) == 0 && (0x01 & len) == 0) @@ -656,12 +652,12 @@ static int davinci_nand_exec_instr(struct davinci_nand_info *info, break; case NAND_OP_DATA_IN_INSTR: - nand_davinci_read_buf(&info->chip, instr->ctx.data.buf.in, + nand_davinci_read_buf(info, instr->ctx.data.buf.in, instr->ctx.data.len); break; case NAND_OP_DATA_OUT_INSTR: - nand_davinci_write_buf(&info->chip, instr->ctx.data.buf.out, + nand_davinci_write_buf(info, instr->ctx.data.buf.out, instr->ctx.data.len); break; -- 2.25.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/