Skip to content

Commit d57e558

Browse files
Peter Ujfalusiehristev
authored andcommitted
iio: adc: at91-sama5d2_adc: 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. The dma_request_chan() is the standard API to request slave channel, clients should be moved away from the legacy API to allow us to retire them. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 12800dc commit d57e558

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/iio/adc/at91-sama5d2_adc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,10 +1444,10 @@ static void at91_adc_dma_init(struct platform_device *pdev)
14441444
if (st->dma_st.dma_chan)
14451445
return;
14461446

1447-
st->dma_st.dma_chan = dma_request_slave_channel(&pdev->dev, "rx");
1448-
1449-
if (!st->dma_st.dma_chan) {
1447+
st->dma_st.dma_chan = dma_request_chan(&pdev->dev, "rx");
1448+
if (IS_ERR(st->dma_st.dma_chan)) {
14501449
dev_info(&pdev->dev, "can't get DMA channel\n");
1450+
st->dma_st.dma_chan = NULL;
14511451
goto dma_exit;
14521452
}
14531453

0 commit comments

Comments
 (0)