summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Trimmer <simont@opensource.cirrus.com>2023-05-18 16:02:49 +0100
committerMark Brown <broonie@kernel.org>2023-05-19 11:32:12 +0900
commitc9001a2754528fa5da20e8674b3afbd8c134cc91 (patch)
tree9c776a45b7158eb8b39874d05205e8079b46b128
parent608f1b0dbddec6b2fd766c10bcce2b651995e936 (diff)
downloadlinux-stable-c9001a2754528fa5da20e8674b3afbd8c134cc91.tar.gz
linux-stable-c9001a2754528fa5da20e8674b3afbd8c134cc91.tar.bz2
linux-stable-c9001a2754528fa5da20e8674b3afbd8c134cc91.zip
ASoC: cs35l56: sdw_write_no_pm() should be performed under a pm_runtime request
SoundWire bus accesses must be performed under the guard of a pm_runtime request, in this case the write was being performed just after the request had been put() and so the bus could not be guaranteed to be available. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/Message-Id: <20230518150250.1121006-3-rf@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/cs35l56.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index e4bf38873de5..d1d304ad559b 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -903,15 +903,15 @@ static void cs35l56_dsp_work(struct work_struct *work)
err_unlock:
mutex_unlock(&cs35l56->irq_lock);
err:
- pm_runtime_mark_last_busy(cs35l56->dev);
- pm_runtime_put_autosuspend(cs35l56->dev);
-
/* Re-enable SoundWire interrupts */
if (cs35l56->sdw_peripheral) {
cs35l56->sdw_irq_no_unmask = false;
sdw_write_no_pm(cs35l56->sdw_peripheral, CS35L56_SDW_GEN_INT_MASK_1,
CS35L56_SDW_INT_MASK_CODEC_IRQ);
}
+
+ pm_runtime_mark_last_busy(cs35l56->dev);
+ pm_runtime_put_autosuspend(cs35l56->dev);
}
static int cs35l56_component_probe(struct snd_soc_component *component)