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: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Peter Ujfalusi 2020-01-07 12:52:53 +01:00 committed by Mauro Carvalho Chehab
parent af5b333a79
commit 05e2ebfa2b
1 changed files with 7 additions and 4 deletions

View File

@ -1910,10 +1910,13 @@ static int dcmi_probe(struct platform_device *pdev)
return PTR_ERR(mclk);
}
chan = dma_request_slave_channel(&pdev->dev, "tx");
if (!chan) {
dev_info(&pdev->dev, "Unable to request DMA channel, defer probing\n");
return -EPROBE_DEFER;
chan = dma_request_chan(&pdev->dev, "tx");
if (IS_ERR(chan)) {
ret = PTR_ERR(chan);
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"Failed to request DMA channel: %d\n", ret);
return ret;
}
spin_lock_init(&dcmi->irqlock);