From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gXWXx-0004vK-8x for linux-mtd@lists.infradead.org; Thu, 13 Dec 2018 19:21:22 +0000 Date: Thu, 13 Dec 2018 20:20:56 +0100 From: Boris Brezillon To: Boris Brezillon , Richard Weinberger , Miquel Raynal , linux-mtd@lists.infradead.org Cc: Alexander Sverdlin , David Woodhouse , Brian Norris , Marek Vasut , stable@vger.kernel.org Subject: Re: [PATCH] mtd: rawnand: Pass the parent of pdev to dma_request_chan() Message-ID: <20181213202056.273e9612@bbrezillon> In-Reply-To: <20181213191944.3585-1-boris.brezillon@bootlin.com> References: <20181213191944.3585-1-boris.brezillon@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Oops, sorry, wrong prefix. I'll send a v2. On Thu, 13 Dec 2018 20:19:44 +0100 Boris Brezillon wrote: > 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 > Cc: > Signed-off-by: Boris Brezillon > --- > drivers/mtd/nand/raw/omap2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c > index 886d05c391ef..68e8b9f7f372 100644 > --- a/drivers/mtd/nand/raw/omap2.c > +++ b/drivers/mtd/nand/raw/omap2.c > @@ -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");