Explicitly inherit from nand_controller instead of using the dummy controller object. Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> --- drivers/mtd/nand/raw/cafe_nand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c index 348debbc04af..2825489a71b8 100644 --- a/drivers/mtd/nand/raw/cafe_nand.c +++ b/drivers/mtd/nand/raw/cafe_nand.c @@ -146,6 +146,7 @@ #define CAFE_FIELD_GET(reg, field, val) FIELD_GET(CAFE_##reg##_##field, val) struct cafe_priv { + struct nand_controller base; struct nand_chip nand; struct pci_dev *pdev; void __iomem *mmio; @@ -920,7 +921,9 @@ static int cafe_nand_probe(struct pci_dev *pdev, cafe->usedma = 0; /* Scan to find existence of the device */ - cafe->nand.legacy.dummy_controller.ops = &cafe_nand_controller_ops; + nand_controller_init(&cafe->base); + cafe->base.ops = &cafe_nand_controller_ops; + cafe->nand.controller = &cafe->base; err = nand_scan(&cafe->nand, 2); if (err) goto out_irq; -- 2.25.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/