All of lore.kernel.org
 help / color / mirror / Atom feed
From: YLCHANG2 <neo.chang70@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, Neo Chang <YLCHANG2@nuvoton.com>
Cc: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	robh@kernel.org, krzk+dt@kernel.org, linux-sound@vger.kernel.org,
	devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	kchsu0@nuvoton.com, sjlin0@nuvoton.com, lkp@intel.com
Subject: Re: [PATCH v2 2/2] ASoC: codecs: nau8310: Add support for NAU83G10 amplifier
Date: Tue, 17 Nov 2026 17:54:23 +0800	[thread overview]
Message-ID: <5c4ec348-e0cf-4f4e-958a-f0c86296bf83@gmail.com> (raw)
In-Reply-To: <9078a957-c183-42cb-84a8-0f15661fd23d@kernel.org>


On 11/17/26 17:28, Krzysztof Kozlowski wrote:
> On 17/11/2026 04:38, YLCHANG2 wrote:
>>>> +static void nau8310_i2c_remove(struct i2c_client *client)
>>>> +{
>>>> +	struct nau8310 *nau8310 = i2c_get_clientdata(client);
>>>> +
>>>> +	cancel_work_sync(&nau8310->load_fw_work);
>>> This looks safe, but still error-prone and discouraged. Use same order
>>> of cleanup as order of init/allocation in probe.
>>>
>>> See also include/linux/devm-helpers.h
>> Got it. I will use devm_work_autocancel() in probe instead of manual
>> cancellation in remove().
> To clarify: use reversed order of the cleanup, obviously, to match the
> probe in a reversed way.
>
> Best regards,
> Krzysztof
Hi Krzysztof,

Thanks for the reminder. I will adjust the initialization order in probe()
so that devm_work_autocancel() is registered after the regmap 
initialization.
This ensures the cleanup follows in the proper reverse order.

Best regards,
Neo

  reply	other threads:[~2026-11-17  9:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09  5:12 [PATCH v2 0/2] ASoC: codecs: nau8310: Add NAU83G10 amplifier Neo Chang
2026-11-09  5:12 ` [PATCH v2 1/2] ASoC: dt-bindings: nuvoton,nau8310: Add NAU83G10 Neo Chang
2026-11-09  5:23   ` sashiko-bot
2026-11-09 13:11   ` Krzysztof Kozlowski
2026-11-17  3:38     ` YLCHANG2
2026-11-09  5:12 ` [PATCH v2 2/2] ASoC: codecs: nau8310: Add support for NAU83G10 amplifier Neo Chang
2026-11-09  5:44   ` sashiko-bot
2026-11-09 13:15   ` Krzysztof Kozlowski
2026-11-17  3:38     ` YLCHANG2
2026-11-17  9:28       ` Krzysztof Kozlowski
2026-11-17  9:54         ` YLCHANG2 [this message]
2026-11-09 19:48   ` Mark Brown
2026-11-17  3:39     ` YLCHANG2

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=5c4ec348-e0cf-4f4e-958a-f0c86296bf83@gmail.com \
    --to=neo.chang70@gmail.com \
    --cc=YLCHANG2@nuvoton.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kchsu0@nuvoton.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=sjlin0@nuvoton.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.