summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/mtk_nand.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-09-06 15:05:33 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-10-03 12:12:25 +0300
commit858838b87ef542c35b5401a6469d162d103d1d8f (patch)
tree538e35245704e9c050bc619dbccc3dbf7671ddeb /drivers/mtd/nand/raw/mtk_nand.c
parent2e7f1cec271c209128d0535e0cc1c49d3cf03624 (diff)
downloadlinux-858838b87ef542c35b5401a6469d162d103d1d8f.tar.xz
mtd: rawnand: Pass a nand_chip object to chip->setup_data_interface()
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->setup_data_interface() hook. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/mtk_nand.c')
-rw-r--r--drivers/mtd/nand/raw/mtk_nand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c
index cf8c42fb8feb..42f9dc2cd172 100644
--- a/drivers/mtd/nand/raw/mtk_nand.c
+++ b/drivers/mtd/nand/raw/mtk_nand.c
@@ -503,10 +503,10 @@ static void mtk_nfc_write_buf(struct nand_chip *chip, const u8 *buf, int len)
mtk_nfc_write_byte(chip, buf[i]);
}
-static int mtk_nfc_setup_data_interface(struct mtd_info *mtd, int csline,
+static int mtk_nfc_setup_data_interface(struct nand_chip *chip, int csline,
const struct nand_data_interface *conf)
{
- struct mtk_nfc *nfc = nand_get_controller_data(mtd_to_nand(mtd));
+ struct mtk_nfc *nfc = nand_get_controller_data(chip);
const struct nand_sdr_timings *timings;
u32 rate, tpoecs, tprecs, tc2r, tw2r, twh, twst, trlt;