[PATCH v2 1/4] dma: Add devm_dma_request_chan()

Csókás Bence csokas.bence at prolan.hu
Mon Feb 3 05:09:54 PST 2025


Hi,

On 2025. 02. 03. 13:27, Alexander Dahl wrote:
>> +	if (!IS_ERR(chan))
>> +		ret = devm_add_action_or_reset(dev, dmaenginem_release_channel, chan);
> 
> Why not using dma_release_channel() directly here?  What's the point
> of introducing dmaenginem_release_channel() further above?

I followed the existing practice, used by 
`dmaenginem_async_device_unregister()`. I suspect it was done like this 
because the devm callback function's signature takes a `void *` and not 
`struct dma_chan *`.

Bence




More information about the linux-arm-kernel mailing list