All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: YLCHANG2 <neo.chang70@gmail.com>, 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 10:28:03 +0100	[thread overview]
Message-ID: <9078a957-c183-42cb-84a8-0f15661fd23d@kernel.org> (raw)
In-Reply-To: <6d7f4ecd-bac0-44d6-a704-57cdd2877729@gmail.com>

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

  reply	other threads:[~2026-11-17  9:28 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 [this message]
2026-11-17  9:54         ` YLCHANG2
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=9078a957-c183-42cb-84a8-0f15661fd23d@kernel.org \
    --to=krzk@kernel.org \
    --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=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=neo.chang70@gmail.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.