]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wcd-mbhc-v2: Revert "ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()"
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 29 Sep 2022 13:15:28 +0000 (15:15 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 29 Sep 2022 14:20:12 +0000 (15:20 +0100)
commit67c7f22886984d45efd7c4cf29e4572d3e4b7eb5
treea8c9d3d782985f5dc1d8c78be8bcc5835ec5d4e0
parentf3665eee36c8ebe5530c68548e4be262b53dae69
ASoC: wcd-mbhc-v2: Revert "ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()"

This reverts commit 0b15f8c10fda17010908ebddf61fc130e2957183 ("ASoC:
wcd-mbhc-v2: use pm_runtime_resume_and_get()"), because it introduced
double runtime PM put if pm_runtime_get_sync() returns -EACCES:

  wcd934x-codec wcd934x-codec.3.auto: WCD934X Minor:0x1 Version:0x401
  wcd934x-codec wcd934x-codec.3.auto: Runtime PM usage count underflow!

The commit claimed no changes in functionality except dropping the
reference on -EACCESS.  This is exactly the change introducing bug
because function calls unconditionally pm_runtime_put_autosuspend() at
the end.

Fixes: 0b15f8c10fda ("ASoC: wcd-mbhc-v2: use pm_runtime_resume_and_get()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220929131528.217502-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd-mbhc-v2.c