[PATCH] ASoC: meson: aiu-fifo.c: use devm_kzalloc(), and remove .remove function

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed Sep 14 02:04:48 CEST 2022


Hi Jerome

> The AIU is a device that provides multiple ASoC components. I know it is
> border line to have this and I'm sorry I was not able to contribute on
> this lately.
> 
> The device is a bit complex as it is. The allocation in question really
> belongs to DAI. Moving it to the device level might be possible but it
> would not help make the code easy to follow and maintain.
> 
> I usually pick devm_ function whenever possible but here I chose the old
> school way on purpose, to make sure the memory is managed correctly.
(snip)
> It would still allocate the memory multiple times if the card driver
> gets unloaded and reloaded, manually for example.
> 
> It would be strange to do so, but it remains incorrect from the driver
> to allocate the memory like this.

OK, let's skip this patch.
It is not a big deal

Thank you for your help !!

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list