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

media: pxa_camera: 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>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 858eff03
...@@ -2440,23 +2440,23 @@ static int pxa_camera_probe(struct platform_device *pdev) ...@@ -2440,23 +2440,23 @@ static int pxa_camera_probe(struct platform_device *pdev)
pcdev->base = base; pcdev->base = base;
/* request dma */ /* request dma */
pcdev->dma_chans[0] = dma_request_slave_channel(&pdev->dev, "CI_Y"); pcdev->dma_chans[0] = dma_request_chan(&pdev->dev, "CI_Y");
if (!pcdev->dma_chans[0]) { if (IS_ERR(pcdev->dma_chans[0])) {
dev_err(&pdev->dev, "Can't request DMA for Y\n"); dev_err(&pdev->dev, "Can't request DMA for Y\n");
return -ENODEV; return PTR_ERR(pcdev->dma_chans[0]);
} }
pcdev->dma_chans[1] = dma_request_slave_channel(&pdev->dev, "CI_U"); pcdev->dma_chans[1] = dma_request_chan(&pdev->dev, "CI_U");
if (!pcdev->dma_chans[1]) { if (IS_ERR(pcdev->dma_chans[1])) {
dev_err(&pdev->dev, "Can't request DMA for Y\n"); dev_err(&pdev->dev, "Can't request DMA for U\n");
err = -ENODEV; err = PTR_ERR(pcdev->dma_chans[1]);
goto exit_free_dma_y; goto exit_free_dma_y;
} }
pcdev->dma_chans[2] = dma_request_slave_channel(&pdev->dev, "CI_V"); pcdev->dma_chans[2] = dma_request_chan(&pdev->dev, "CI_V");
if (!pcdev->dma_chans[2]) { if (IS_ERR(pcdev->dma_chans[2])) {
dev_err(&pdev->dev, "Can't request DMA for V\n"); dev_err(&pdev->dev, "Can't request DMA for V\n");
err = -ENODEV; err = PTR_ERR(pcdev->dma_chans[2]);
goto exit_free_dma_u; goto exit_free_dma_u;
} }
......
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