[PATCH v1 2/7] ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan()

Mark Brown broonie at kernel.org
Tue Sep 15 10:35:38 PDT 2026


On Tue, Sep 15, 2026 at 12:04:23PM +0200, Andy Shevchenko wrote:
> Replace dma_request_slave_channel() by dma_request_chan() as suggested
> since the former is deprecated.

> @@ -171,13 +171,12 @@ static int sprd_pcm_request_dma_channel(struct snd_soc_component *component,
>  	for (i = 0; i < channels; i++) {
>  		struct sprd_pcm_dma_data *data = &dma_private->data[i];
>  
> -		data->chan = dma_request_slave_channel(dev,
> -						       dma_params->chan_name[i]);
> -		if (!data->chan) {
> +		data->chan = dma_request_chan(dev, dma_params->chan_name[i]);
> +		if (IS_ERR(data->chan)) {
>  			dev_err(dev, "failed to request dma channel:%s\n",
>  				dma_params->chan_name[i]);
>  			sprd_pcm_release_dma_channel(substream);
> -			return -ENODEV;
> +			return PTR_ERR(data->chan);

sprd_pcm_release_dma_channel() does:

                if (data->chan) {
                        dma_release_channel(data->chan);
                        data->chan = NULL;

so this won't DTRT with propagating the return code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260915/5d065307/attachment.sig>


More information about the linux-arm-kernel mailing list