Re: [PATCH] sound: pci: mixart: use managed resources for PCI and DMA allocations
Takashi Iwai <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.sound |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 11 Aug 2026 06:22:41 +0200, Rosen Penev wrote: > > Convert the Digigram miXart driver to use managed (devm_) resources > for PCI device management, IRQ allocation, memory mapping, and DMA > buffer allocation. This simplifies error handling paths and reduces > the risk of resource leaks. > > - Use pcim_enable_device() and pcim_iomap_region() for managed PCI > resource handling > - Use devm_kzalloc() for manager structure allocation > - Use devm_request_threaded_irq() for IRQ allocation > - Use snd_devm_card_new() for sound card creation > - Use snd_devm_alloc_pages() for DMA buffer allocation > - Simplify snd_mixart_free() to only handle mailbox shutdown and > board reset since other resources are now auto-released > > Clean up trailing whitespace on touched lines. > > Signed-off-by: Rosen Penev <[email protected]> I guess this is only compile-tested? This driver is somewhat special, and it composes of multiple sound-card objects per device, hence you can't use devres under the card. thanks, Takashi