[PATCH] ALSA: hda: Remove redundant runtime PM calls
Takashi Iwai
tiwai at suse.de
Fri Nov 19 17:27:30 CET 2021
The previous fix for more comprehensive runtime PM calls turned out to
be not good as hoped; a few calls including pm_runtime_enable() and
pm_runtime_disable() are rather utterly superfluous for PCI devices,
even triggering a kernel error message. Better to drop those calls.
Note that the problem we wanted to solve with that commit seems
irrelevant with the fix itself; the original bug (a GPF at
azx_remove()) was likely a regression by the recent PCI core cleanup,
and the buggy PCI change has been already reverted. So basically we
were scratching a wrong surface. OTOH, making the runtime PM calls
symmetric for both probe and remove is more consistent, and maybe
that's a sensible outcome.
Fixes: 4f66a9ef37d3 ("ALSA: hda: intel: More comprehensive PM runtime setup for controller driver")
Reported-by: Heiner Kallweit <hkallweit1 at gmail.com>
Link: https://lore.kernel.org/r/d9d76980-966a-e031-70d1-3254ba5be5eb@gmail.com
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
sound/pci/hda/hda_intel.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 45e85180048c..221afacbc7fd 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1349,8 +1349,6 @@ static void azx_free(struct azx *chip)
if (azx_has_pm_runtime(chip) && chip->running) {
pm_runtime_get_noresume(&pci->dev);
- pm_runtime_disable(&pci->dev);
- pm_runtime_set_suspended(&pci->dev);
pm_runtime_forbid(&pci->dev);
pm_runtime_dont_use_autosuspend(&pci->dev);
}
@@ -2328,8 +2326,6 @@ static int azx_probe_continue(struct azx *chip)
if (azx_has_pm_runtime(chip)) {
pm_runtime_use_autosuspend(&pci->dev);
pm_runtime_allow(&pci->dev);
- pm_runtime_set_active(&pci->dev);
- pm_runtime_enable(&pci->dev);
pm_runtime_put_autosuspend(&pci->dev);
}
--
2.31.1
More information about the Alsa-devel
mailing list