Re: [PATCH v3] ASoC: wm8962: Stop IRQ from requeuing mic_work on remove

From: Charles Keepax

Date: Fri Sep 25 2026 - 05:31:30 EST


On Fri, Sep 25, 2026 at 10:08:41AM +0100, Charles Keepax wrote:
> On Thu, Sep 24, 2026 at 03:05:41PM -0700, mhun512@xxxxxxxxx wrote:
> > /* Send an initial empty report */
> > snd_soc_jack_report(wm8962->jack, 0,
> > @@ -3592,9 +3593,7 @@ static int wm8962_probe(struct snd_soc_component
> > *component)
> >
> > static void wm8962_remove(struct snd_soc_component *component)
> > {
> > - struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);
> > -
> > - cancel_delayed_work_sync(&wm8962->mic_work);
> > + wm8962_mic_detect(component, NULL);
> >
> > wm8962_free_gpio(component);
> > wm8962_free_beep(component);
> > diff --git a/sound/soc/tegra/tegra_wm8962.c b/sound/soc/tegra/tegra_wm8962.c
> > index 31f9d9181595..a79d464b6a80 100644
> > --- a/sound/soc/tegra/tegra_wm8962.c
> > +++ b/sound/soc/tegra/tegra_wm8962.c
> > @@ -97,18 +97,6 @@ static int tegra_wm8962_init(struct snd_soc_pcm_runtime *rtd)
> > return 0;
> > }
> >
> > -static int tegra_wm8962_remove(struct snd_soc_card *card)
> > -{
> > - struct snd_soc_dai_link *link = &card->dai_link[0];
> > - struct snd_soc_pcm_runtime *rtd = snd_soc_get_pcm_runtime(card, link);
> > - struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
> > - struct snd_soc_component *component = codec_dai->component;
> > -
> > - wm8962_mic_detect(component, NULL);
> > -
> > - return 0;
> > -}
>
> I don't think you should remove this. It is possible to remove
> the machine driver but not the codec driver, and in that case you
> still want the mic_detect disabled.

Sorry mistake on my part, as we are doing wm8962_mic_detect in
component remove, not bus remove you probably can drop this.

Thanks,
Charles