summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/ams-delta.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-11-11 10:55:23 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-12-07 12:38:27 +0300
commitf2abfeb2078b9682bfeb77f91816fcf2177b3051 (patch)
tree10c934f3a3bf2387feaba1faaa4366266bd7dd8a /drivers/mtd/nand/raw/ams-delta.c
parent7d6c37e90cf9013bd18240cd861b9ae7b006f91f (diff)
downloadlinux-f2abfeb2078b9682bfeb77f91816fcf2177b3051.tar.xz
mtd: rawnand: Move the ->exec_op() method to nand_controller_ops
->exec_op() is a controller method and has nothing to do in the nand_chip struct. Let's move it to the nand_controller_ops struct and adjust the core and drivers accordingly. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/ams-delta.c')
-rw-r--r--drivers/mtd/nand/raw/ams-delta.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw/ams-delta.c
index 611c822e967f..f8eb4a419e77 100644
--- a/drivers/mtd/nand/raw/ams-delta.c
+++ b/drivers/mtd/nand/raw/ams-delta.c
@@ -176,6 +176,10 @@ static int ams_delta_exec_op(struct nand_chip *this,
return ret;
}
+static const struct nand_controller_ops ams_delta_ops = {
+ .exec_op = ams_delta_exec_op,
+};
+
/*
* Main initialization routine
*/
@@ -216,8 +220,6 @@ static int ams_delta_init(struct platform_device *pdev)
priv->io_base = io_base;
nand_set_controller_data(this, priv);
- this->exec_op = ams_delta_exec_op;
-
priv->gpiod_rdy = devm_gpiod_get_optional(&pdev->dev, "rdy", GPIOD_IN);
if (IS_ERR(priv->gpiod_rdy)) {
err = PTR_ERR(priv->gpiod_rdy);
@@ -277,6 +279,7 @@ static int ams_delta_init(struct platform_device *pdev)
ams_delta_dir_input(priv, true);
/* Initialize the NAND controller object embedded in ams_delta_nand. */
+ priv->base.ops = &ams_delta_ops;
nand_controller_init(&priv->base);
this->controller = &priv->base;