diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-11-11 10:55:13 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2018-12-07 12:38:25 +0300 |
commit | 9fd6bcffe741cfd237bb4a310e8cc82457a6c541 (patch) | |
tree | 1a289ad558b91b78816ef8de831c04962d281c97 /drivers/mtd/nand | |
parent | 876ba603c9e0fa7885f89a35ed221792caea8034 (diff) | |
download | linux-9fd6bcffe741cfd237bb4a310e8cc82457a6c541.tar.xz |
mtd: rawnand: ams-delta: Explicitly inherit from nand_controller
All NAND objects are supposed to inherit from nand_controller. The
framework is providing a dummy controller object, but we're moving
away from this approach in favor of explicit inheritance.
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')
-rw-r--r-- | drivers/mtd/nand/raw/ams-delta.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw/ams-delta.c index c59672a92832..34b83edb965c 100644 --- a/drivers/mtd/nand/raw/ams-delta.c +++ b/drivers/mtd/nand/raw/ams-delta.c @@ -29,6 +29,7 @@ * MTD structure for E3 (Delta) */ struct ams_delta_nand { + struct nand_controller base; struct nand_chip nand_chip; struct gpio_desc *gpiod_rdy; struct gpio_desc *gpiod_nce; @@ -277,6 +278,10 @@ static int ams_delta_init(struct platform_device *pdev) /* Initialize data port direction to a known state */ ams_delta_dir_input(priv, true); + /* Initialize the NAND controller object embedded in ams_delta_nand. */ + nand_controller_init(&priv->base); + this->controller = &priv->base; + /* Scan to find existence of the device */ err = nand_scan(this, 1); if (err) |