From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <alsa-devel@alsa-project.org>,
<patches@opensource.cirrus.com>, <linux-sound@vger.kernel.org>
Subject: [PATCH 2/3] ASoC: cs42l43: Sync the hp ilimit works when removing the component
Date: Fri, 2 Feb 2024 14:06:18 +0000 [thread overview]
Message-ID: <20240202140619.1068560-2-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20240202140619.1068560-1-ckeepax@opensource.cirrus.com>
Synchronise the headphone ilimit work functions when removing the
component. These can only trigger whilst the headphone is enabled which
shouldn't be possible once the component is removed but the works rely
on the stashed component pointer so they should be shut down before the
code moves on from component remove.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/cs42l43.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c
index 9e1deb3242cb..c84d5952cdb5 100644
--- a/sound/soc/codecs/cs42l43.c
+++ b/sound/soc/codecs/cs42l43.c
@@ -2115,6 +2115,9 @@ static void cs42l43_component_remove(struct snd_soc_component *component)
{
struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component);
+ cancel_work_sync(&priv->hp_ilimit_work);
+ cancel_delayed_work_sync(&priv->hp_ilimit_clear_work);
+
priv->component = NULL;
}
--
2.30.2
next prev parent reply other threads:[~2024-02-02 14:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 14:06 [PATCH 1/3] ASoC: cs42l43: Add clear of stashed pointer on component remove Charles Keepax
2024-02-02 14:06 ` Charles Keepax [this message]
2024-02-02 14:06 ` [PATCH 3/3] ASoC: cs42l43: Shut down jack detection " Charles Keepax
2024-02-06 9:37 ` [PATCH 1/3] ASoC: cs42l43: Add clear of stashed pointer " 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=20240202140619.1068560-2-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.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