Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	linux-arm-kernel@lists.infradead.org (moderated
	list:ARM/Microchip (AT91) SoC support),
	linux-kernel@vger.kernel.org (open list),
	llvm@lists.linux.dev (open list:CLANG/LLVM BUILD
	SUPPORT:Keyword:b(?i:clang|llvm)b)
Subject: Re: [PATCH] ALSA: atmel: ac97c: use platform helpers and devm cleanup
Date: Wed, 22 Jul 2026 13:27:19 +0200	[thread overview]
Message-ID: <878q73gt7s.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260721225411.815553-1-rosenp@gmail.com>

On Wed, 22 Jul 2026 00:54:11 +0200,
Rosen Penev wrote:
> 
> Convert atmel_ac97c_probe() to the managed APIs. Replace the open-coded
> platform_get_resource() + ioremap() with devm_platform_ioremap_resource(),
> which requests and maps the AC97C register window in one call. Switch the
> clock to devm_clk_get_enabled(), the card to snd_devm_card_new(), and the
> interrupt to devm_request_irq(). The now-unnecessary error-path cleanup
> and the manual teardown in atmel_ac97c_remove() are dropped, since devm
> handles them.
> 
> platform_get_irq() was already used; tighten its error check to irq < 0.
> 
> Both resource and IRQ lookups are equivalent for a platform-backed
> device. The AC97C register window is owned solely by this driver, so the
> new region request cannot conflict with another claimant, and it is
> mapped exactly once (no double mapping).
> 
> No functional change; built for ARM (allmodconfig + SND_ATMEL_AC97C)
> with LLVM=1 and sound/atmel/ac97c.o compiles cleanly.
> 
> Assisted-by: opencode:hy3-free
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

Applied to for-next branch.  Thanks.


Takashi


      reply	other threads:[~2026-07-22 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 22:54 [PATCH] ALSA: atmel: ac97c: use platform helpers and devm cleanup Rosen Penev
2026-07-22 11:27 ` 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=878q73gt7s.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=justinstitt@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas.ferre@microchip.com \
    --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