Skip to contentSkip to conversation

ALSA: hda: cs35l56: Call pm_runtime_dont_use_autosuspend()

PATCH In review Richard Fitzgerald 2 participants 2 messages Sep 8, 2023 – Sep 11, 2023 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda: cs35l56: Call pm_runtime_dont_use_autosuspend()

Driver remove() must call pm_runtime_dont_use_autosuspend().

Drivers that call pm_runtime_use_autosuspend() must disable it in driver remove(). Unfortunately until recently this was only mentioned in 1 line in a 900+ line document so most people hadn't noticed this. It has only recently been added to the kerneldoc of pm_runtime_use_autosuspend().

Fixes 2a930a6da8ec ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")
---
 sound/pci/hda/cs35l56_hda.c | 1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/cs35l56_hda.c +1 -0
index 76b9c685560b..9e4976bdb5e0 100644
@@ -1003,6 +1003,7 @@ void cs35l56_hda_remove(struct device *dev)
 {
 	struct cs35l56_hda *cs35l56 = dev_get_drvdata(dev);
 
+	pm_runtime_dont_use_autosuspend(cs35l56->base.dev);
 	pm_runtime_get_sync(cs35l56->base.dev);
 	pm_runtime_disable(cs35l56->base.dev);
 
Signature · 1 line
2.30.2
#1 lore raw
Quoted 11 lines · Richard Fitzgerald

Driver remove() must call pm_runtime_dont_use_autosuspend().

Drivers that call pm_runtime_use_autosuspend() must disable it in driver remove(). Unfortunately until recently this was only mentioned in 1 line in a 900+ line document so most people hadn't noticed this. It has only recently been added to the kerneldoc of pm_runtime_use_autosuspend().

Fixes 2a930a6da8ec ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")

Applied now.
The Fixes tag points to a non-existing ID, so I corrected in my side to 73cfbfa9caea.

thanks,

Takashi

Quoted 19 lines
---
 sound/pci/hda/cs35l56_hda.c | 1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/cs35l56_hda.c +1 -0
index 76b9c685560b..9e4976bdb5e0 100644
@@ -1003,6 +1003,7 @@ void cs35l56_hda_remove(struct device *dev)
 {
 	struct cs35l56_hda *cs35l56 = dev_get_drvdata(dev);
 
+	pm_runtime_dont_use_autosuspend(cs35l56->base.dev);
 	pm_runtime_get_sync(cs35l56->base.dev);
 	pm_runtime_disable(cs35l56->base.dev);
 
Signature · 1 line
2.30.2