diff options
author | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2023-09-07 20:10:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-20 13:52:04 +0300 |
commit | 44dcf6d33e9e239f5e76cc7a2d2cf831882ea23e (patch) | |
tree | a9b403532280b587ae6f6998a5982c63e9a73dbf | |
parent | 2d81896fe161dbffb96c053b0afa7fab9bb2875f (diff) | |
download | linux-44dcf6d33e9e239f5e76cc7a2d2cf831882ea23e.tar.xz |
ALSA: hda: cs35l41: Undo runtime PM changes at driver exit time
[ Upstream commit 85a1bf86fac0c195929768b4e92c78cad107523b ]
According to the documentation, drivers are responsible for undoing at
removal time all runtime PM changes done during probing.
Hence, add the missing calls to pm_runtime_dont_use_autosuspend(), which
are necessary for undoing pm_runtime_use_autosuspend().
Fixes: 1873ebd30cc8 ("ALSA: hda: cs35l41: Support Hibernation during Suspend")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230907171010.1447274-11-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | sound/pci/hda/cs35l41_hda.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index f92fc84199bc..c79a12e5c9ad 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -1509,6 +1509,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i return 0; err_pm: + pm_runtime_dont_use_autosuspend(cs35l41->dev); pm_runtime_disable(cs35l41->dev); pm_runtime_put_noidle(cs35l41->dev); @@ -1527,6 +1528,7 @@ void cs35l41_hda_remove(struct device *dev) struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev); pm_runtime_get_sync(cs35l41->dev); + pm_runtime_dont_use_autosuspend(cs35l41->dev); pm_runtime_disable(cs35l41->dev); if (cs35l41->halo_initialized) |