linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: stm32-dcmi: Use dma_request_chan() instead dma_request_slave_channel()
@ 2019-12-17 10:41 Peter Ujfalusi
  2019-12-18 10:52 ` Hugues FRUCHET
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Ujfalusi @ 2019-12-17 10:41 UTC (permalink / raw)
  To: mchehab, hugues.fruchet, mcoquelin.stm32, alexandre.torgue
  Cc: vkoul, linux-media, linux-kernel, linux-stm32, linux-arm-kernel

dma_request_slave_channel() is a wrapper on top of dma_request_chan()
eating up the error code.

By using dma_request_chan() directly the driver can support deferred
probing against DMA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/media/platform/stm32/stm32-dcmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
index 9392e3409fba..55351872b0c7 100644
--- a/drivers/media/platform/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/stm32/stm32-dcmi.c
@@ -1910,10 +1910,10 @@ static int dcmi_probe(struct platform_device *pdev)
 		return PTR_ERR(mclk);
 	}
 
-	chan = dma_request_slave_channel(&pdev->dev, "tx");
-	if (!chan) {
+	chan = dma_request_chan(&pdev->dev, "tx");
+	if (IS_ERR(chan)) {
 		dev_info(&pdev->dev, "Unable to request DMA channel, defer probing\n");
-		return -EPROBE_DEFER;
+		return PTR_ERR(chan);
 	}
 
 	spin_lock_init(&dcmi->irqlock);
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


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

end of thread, other threads:[~2020-01-07 11:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 10:41 [PATCH] media: stm32-dcmi: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-18 10:52 ` Hugues FRUCHET
2020-01-07  9:46   ` Hugues FRUCHET
2020-01-07 10:38     ` Peter Ujfalusi
2020-01-07 11:08       ` Hugues FRUCHET

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).