]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mtd: rawnand: omap2: Pass the parent of pdev to dma_request_chan()
authorBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 13 Dec 2018 19:22:27 +0000 (20:22 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 14 Dec 2018 21:45:16 +0000 (22:45 +0100)
Commit e1e6255c311b ("mtd: rawnand: omap2: convert driver to
nand_scan()") moved part of the init code in the ->attach_chip hook
and at the same time changed the struct device object passed to
dma_request_chan() (&pdev->dev instead of pdev->dev.parent).

Fixes: e1e6255c311b ("mtd: rawnand: omap2: convert driver to nand_scan()")
Reported-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/omap2.c

index 886d05c391efe20b08b78bdb2fb145f3f859b752..68e8b9f7f372a71618837e6a39e88d373c59ed3b 100644 (file)
@@ -1944,7 +1944,7 @@ static int omap_nand_attach_chip(struct nand_chip *chip)
        case NAND_OMAP_PREFETCH_DMA:
                dma_cap_zero(mask);
                dma_cap_set(DMA_SLAVE, mask);
-               info->dma = dma_request_chan(dev, "rxtx");
+               info->dma = dma_request_chan(dev->parent, "rxtx");
 
                if (IS_ERR(info->dma)) {
                        dev_err(dev, "DMA engine request failed\n");