All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Tristan Madani <tristmd@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Oder Chiou <oder_chiou@realtek.com>,
	Bard Liao <bardliao@realtek.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Jorge Eduardo Candelaria <jorge.candelaria@ti.com>,
	Margarita Olaya Cabrera <magi.olaya@ti.com>,
	Misael Lopez Cruz <misael.lopez@ti.com>,
	patches@opensource.cirrus.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	tristan@talencesecurity.com
Subject: Re: [PATCH v6 4/4] ASoC: wm8994: drain delayed works on remove and probe error
Date: Mon, 2 Nov 2026 16:59:56 +0000	[thread overview]
Message-ID: <aujBjKHOtcNugTGa@opensource.cirrus.com> (raw)
In-Reply-To: <20261102165340.1558853-5-tristmd@gmail.com>

On Mon, Nov 02, 2026 at 04:53:40PM +0000, Tristan Madani wrote:
> From: Tristan Madani <tristan@talencesecurity.com>
> 
> wm8994_component_probe() schedules several delayed works to handle jack
> detection and microphone status polling.  If the component is removed or
> probe fails after these works are scheduled, they can execute after
> resources are freed.
> 
> Cancel all pending delayed works in the error and removal paths.  Guard
> cancel_delayed_work_sync(&wm8994->mic_work) with a type check because
> INIT_DELAYED_WORK for mic_work only runs in the WM8994 and WM1811 code
> paths.
> 
> Cancel mic_work before and after jackdet_bootstrap because the two can
> re-arm each other: wm1811_mic_work() can re-arm jackdet_bootstrap
> through the DAPM power-up chain (force-enabling MICBIAS2 triggers
> clk_sys_event which queues jackdet_bootstrap), and
> wm1811_jackdet_bootstrap() detects a jack and ultimately queues
> mic_work.  The second mic_work cancel catches any re-arm from a
> jackdet_bootstrap handler that was in flight during the first cancel.
> 
> Fixes: 99af79dff5a6 ("ASoC: wm8994: Ensure we get a notification on startup for jackdet")
> Cc: stable@vger.kernel.org
> Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

  reply	other threads:[~2026-11-02 17:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 16:53 [PATCH v6 0/4] ASoC: cancel pending delayed works on codec removal Tristan Madani
2026-11-02 16:53 ` [PATCH v6 1/4] ASoC: rt5668: cancel delayed works on component removal Tristan Madani
2026-11-05 15:55   ` sashiko-bot
2026-11-02 16:53 ` [PATCH v6 2/4] ASoC: rt5659: cancel jack_detect_work " Tristan Madani
2026-11-05 16:08   ` sashiko-bot
2026-11-02 16:53 ` [PATCH v6 3/4] ASoC: twl6040: cancel headset jack work " Tristan Madani
2026-11-02 16:53 ` [PATCH v6 4/4] ASoC: wm8994: drain delayed works on remove and probe error Tristan Madani
2026-11-02 16:59   ` Charles Keepax [this message]
2026-11-02 23:19 ` [PATCH v6 0/4] ASoC: cancel pending delayed works on codec removal Mark Brown

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=aujBjKHOtcNugTGa@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=jorge.candelaria@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=magi.olaya@ti.com \
    --cc=misael.lopez@ti.com \
    --cc=oder_chiou@realtek.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    --cc=tristan@talencesecurity.com \
    --cc=tristmd@gmail.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.