[PATCH 4/4] ASoC: ux500: Do not allocate the DMA data on every DAI probe

Linus Walleij linusw at kernel.org
Tue Dec 1 14:17:37 PST 2026


On Tue, Dec 1, 2026 at 8:12 PM Arina Kharlamova via B4 Relay
<devnull+arina.kharlamova.mbzuai.ac.ae at kernel.org> wrote:

> From: Arina Kharlamova <arina.kharlamova at mbzuai.ac.ae>
>
> ux500_msp_dai_of_probe() is the DAI probe callback and runs every
> time a sound card binds the MSP DAI. It allocates the playback and
> capture struct snd_dmaengine_dai_dma_data with devm_kzalloc_obj() on
> the MSP platform device, so the two allocations are released only
> when that device is unbound and every card bind adds two more.
>
> Keep the two structures in struct ux500_msp_i2s_drvdata, which lives
> as long as the platform device is bound, and only fill them in the
> DAI probe.
>
> Fixes: f382acbe163a ("ASoC: ux500: Store DMA data in the DAI differently in the pdata and DT case")
> Signed-off-by: Arina Kharlamova <arina.kharlamova at mbzuai.ac.ae>

Looks reasonable:
Reviewed-by: Linus Walleij <linusw at kernel.org>

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list