aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2018-09-06 14:05:13 +0200
committerMiquel Raynal <[email protected]>2018-10-03 11:12:25 +0200
commit47bd59e538d4e7b3ad9c18bef5c1052657bdff59 (patch)
tree89ee6a0d584e3f3793697fcdc3585a0b3b4f955b /include/linux
parent2f91eb6951d9e9d8d751a390cfd3e8b0216d88ef (diff)
mtd: rawnand: plat_nand: Pass a nand_chip object to all platform_nand_ctrl hooks
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. In order to do that, we first need to update the platform_nand_ctrl hooks to take a nand_chip object instead of an mtd_info. We add temporary plat_nand_xxx() wrappers to the do the mtd -> chip conversion, but those will be dropped when patching nand_chip hooks to take a nand_chip object. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alexander Sverdlin <[email protected]> Acked-by: Alexander Sverdlin <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Acked-by: Krzysztof Halasa <[email protected]> Acked-by: Paul Burton <[email protected]> Signed-off-by: Miquel Raynal <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/rawnand.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index d155470f53c8..818cdc0a4dbb 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -1595,11 +1595,11 @@ struct platform_device;
struct platform_nand_ctrl {
int (*probe)(struct platform_device *pdev);
void (*remove)(struct platform_device *pdev);
- int (*dev_ready)(struct mtd_info *mtd);
- void (*select_chip)(struct mtd_info *mtd, int chip);
- void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl);
- void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
- void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
+ int (*dev_ready)(struct nand_chip *chip);
+ void (*select_chip)(struct nand_chip *chip, int cs);
+ void (*cmd_ctrl)(struct nand_chip *chip, int dat, unsigned int ctrl);
+ void (*write_buf)(struct nand_chip *chip, const uint8_t *buf, int len);
+ void (*read_buf)(struct nand_chip *chip, uint8_t *buf, int len);
void *priv;
};