Message ID | 20200828140057.4198-1-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1] ASoC: core: Replace dma_request_slave_channel() with dma_request_chan() | expand |
On Fri, Aug 28, 2020 at 05:00:57PM +0300, Andy Shevchenko wrote: > Drivers should use dma_request_chan() instead of dma_request_slave_channel(). > > dma_request_slave_channel() is a simple wrapper for dma_request_chan() eating > up the error code for channel request failure and makes deferred probing > impossible. It's not fully correct change.
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index fb95c1464e66..ab13e08cd636 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -249,8 +249,7 @@ static int dmaengine_pcm_new(struct snd_soc_component *component, continue; if (!pcm->chan[i] && config && config->chan_names[i]) - pcm->chan[i] = dma_request_slave_channel(dev, - config->chan_names[i]); + pcm->chan[i] = dma_request_chan(dev, config->chan_names[i]); if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) { pcm->chan[i] = dmaengine_pcm_compat_request_channel(
Drivers should use dma_request_chan() instead of dma_request_slave_channel(). dma_request_slave_channel() is a simple wrapper for dma_request_chan() eating up the error code for channel request failure and makes deferred probing impossible. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- sound/soc/soc-generic-dmaengine-pcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)