diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2020-05-01 16:39:15 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-11 09:51:43 +0200 |
commit | f37b1d3c8f3682eb654ad914ca69503f5b98941d (patch) | |
tree | 475c7bd40678411edffb9eb0d2d50dcefa1bbcba /drivers/mtd | |
parent | fddf5cec1cc6321712fc6f0749dd57847b554662 (diff) | |
download | linux-f37b1d3c8f3682eb654ad914ca69503f5b98941d.tar.bz2 |
mtd: rawnand: diskonchip: Inherit from nand_controller
Stop relying on the dummy controller object embedded in nand_chip.legacy
and explicitly inherit from nand_controller.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200501143917.1388957-4-boris.brezillon@collabora.com
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/raw/diskonchip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c index d3ef2d4fddfd..aa17a8ae9d48 100644 --- a/drivers/mtd/nand/raw/diskonchip.c +++ b/drivers/mtd/nand/raw/diskonchip.c @@ -58,6 +58,7 @@ static unsigned long doc_locations[] __initdata = { static struct mtd_info *doclist = NULL; struct doc_priv { + struct nand_controller base; void __iomem *virtadr; unsigned long physadr; u_char ChipID; @@ -1550,6 +1551,7 @@ static int __init doc_probe(unsigned long physadr) goto fail; } + nand_controller_init(&doc->base); mtd = nand_to_mtd(nand); nand->bbt_td = (struct nand_bbt_descr *) (doc + 1); nand->bbt_md = nand->bbt_td + 1; @@ -1557,6 +1559,7 @@ static int __init doc_probe(unsigned long physadr) mtd->owner = THIS_MODULE; mtd_set_ooblayout(mtd, &doc200x_ooblayout_ops); + nand->controller = &doc->base; nand_set_controller_data(nand, doc); nand->legacy.select_chip = doc200x_select_chip; nand->legacy.cmd_ctrl = doc200x_hwcontrol; |