From: Takashi Iwai <tiwai@suse.de>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-sound@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH] sound: pci: mixart: use managed resources for PCI and DMA allocations
Date: Tue, 11 Aug 2026 08:16:06 +0200 [thread overview]
Message-ID: <878q6db2s9.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260811042241.54317-1-rosenp@gmail.com>
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 <rosenp@gmail.com>
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
prev parent reply other threads:[~2026-08-11 6:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 4:22 [PATCH] sound: pci: mixart: use managed resources for PCI and DMA allocations Rosen Penev
2026-08-11 6:16 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878q6db2s9.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=rosenp@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox