]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: tas2552: use pm_runtime_resume_and_get()
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 16 Jun 2022 22:04:26 +0000 (17:04 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 27 Jun 2022 12:18:00 +0000 (13:18 +0100)
The use of pm_runtime_get_sync() is buggy with no use of put_noidle() on
error.

Use pm_runtime_resume_and_get() instead.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2552.c

index c98a9332dcc0e93716634f4be3f6ed61afcd2351..da744cfae611c187b8b5643ed1f44bef09895bad 100644 (file)
@@ -581,7 +581,7 @@ static int tas2552_component_probe(struct snd_soc_component *component)
 
        gpiod_set_value(tas2552->enable_gpio, 1);
 
-       ret = pm_runtime_get_sync(component->dev);
+       ret = pm_runtime_resume_and_get(component->dev);
        if (ret < 0) {
                dev_err(component->dev, "Enabling device failed: %d\n",
                        ret);