Commit 05e2ebfa authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mauro Carvalho Chehab

media: stm32-dcmi: Use dma_request_chan() instead dma_request_slave_channel()

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: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: default avatarHugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent af5b333a
...@@ -1910,10 +1910,13 @@ static int dcmi_probe(struct platform_device *pdev) ...@@ -1910,10 +1910,13 @@ static int dcmi_probe(struct platform_device *pdev)
return PTR_ERR(mclk); return PTR_ERR(mclk);
} }
chan = dma_request_slave_channel(&pdev->dev, "tx"); chan = dma_request_chan(&pdev->dev, "tx");
if (!chan) { if (IS_ERR(chan)) {
dev_info(&pdev->dev, "Unable to request DMA channel, defer probing\n"); ret = PTR_ERR(chan);
return -EPROBE_DEFER; if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"Failed to request DMA channel: %d\n", ret);
return ret;
} }
spin_lock_init(&dcmi->irqlock); spin_lock_init(&dcmi->irqlock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment