[PATCH v2] mtd: rawnand: omap2: Pass the parent of pdev to dma_request_chan()

Subsystems: memory technology devices (mtd), nand flash subsystem, the rest

STALE2853d

3 messages, 3 authors, 2018-12-15 · open the first message on its own page

[PATCH v2] mtd: rawnand: omap2: Pass the parent of pdev to dma_request_chan()

From: Boris Brezillon <hidden>
Date: 2018-12-13 19:22:42

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: <redacted>
Signed-off-by: Boris Brezillon <redacted>
---
Changes in v2:
- Fix the prefix
---
 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

Re: [PATCH v2] mtd: rawnand: omap2: Pass the parent of pdev to dma_request_chan()

From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Date: 2018-12-13 19:51:22

Hello Boris!

On Thu, 13 Dec 2018 20:22:27 +0100
Boris Brezillon [off-list ref] 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>
Yes, it was it, thank you!
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
quoted hunk
Cc: <redacted>
Signed-off-by: Boris Brezillon <redacted>
---
Changes in v2:
- Fix the prefix
---
 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

-- 
Alexander Sverdlin.

Re: [PATCH v2] mtd: rawnand: omap2: Pass the parent of pdev to dma_request_chan()

From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: 2018-12-15 10:27:28

Hi Boris,

Boris Brezillon [off-list ref] wrote on Thu, 13 Dec 2018
20:22:27 +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: <redacted>
Signed-off-by: Boris Brezillon <redacted>
---
Applied on nand/next,

Thanks,
Miquèl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help