linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: Pass the parent of pdev to dma_request_chan()
@ 2018-12-13 19:19 Boris Brezillon
  2018-12-13 19:20 ` Boris Brezillon
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Brezillon @ 2018-12-13 19:19 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: Alexander Sverdlin, David Woodhouse, Brian Norris, Marek Vasut,
	stable

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>
---
 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");
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: rawnand: Pass the parent of pdev to dma_request_chan()
  2018-12-13 19:19 [PATCH] mtd: rawnand: Pass the parent of pdev to dma_request_chan() Boris Brezillon
@ 2018-12-13 19:20 ` Boris Brezillon
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-12-13 19:20 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: Alexander Sverdlin, David Woodhouse, Brian Norris, Marek Vasut,
	stable

Oops, sorry, wrong prefix. I'll send a v2.

On Thu, 13 Dec 2018 20:19:44 +0100
Boris Brezillon <boris.brezillon@bootlin.com> 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 <alexander.sverdlin@gmail.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> ---
>  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");

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-13 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-13 19:19 [PATCH] mtd: rawnand: Pass the parent of pdev to dma_request_chan() Boris Brezillon
2018-12-13 19:20 ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).