Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: rcar_drif: 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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Peter Ujfalusi and committed by
Mauro Carvalho Chehab
1b5482e0 eee16d21

+3 -3
+3 -3
drivers/media/platform/rcar_drif.c
··· 275 275 for_each_rcar_drif_channel(i, &sdr->cur_ch_mask) { 276 276 struct rcar_drif *ch = sdr->ch[i]; 277 277 278 - ch->dmach = dma_request_slave_channel(&ch->pdev->dev, "rx"); 279 - if (!ch->dmach) { 278 + ch->dmach = dma_request_chan(&ch->pdev->dev, "rx"); 279 + if (IS_ERR(ch->dmach)) { 280 280 rdrif_err(sdr, "ch%u: dma channel req failed\n", i); 281 - ret = -ENODEV; 281 + ret = PTR_ERR(ch->dmach); 282 282 goto dmach_error; 283 283 } 284 284