diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2022-10-08 22:05:22 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-10-10 13:01:16 +0100 |
commit | c4ab29b0f3a6f1e167c5a627f7cd036c1d2b7d65 (patch) | |
tree | f2684661a60b3d3da6a081125541b41b048f039a /sound/soc/codecs | |
parent | 551f2994b8ccdbe296e239278531e345d6e94d4d (diff) | |
download | lwn-c4ab29b0f3a6f1e167c5a627f7cd036c1d2b7d65.tar.gz lwn-c4ab29b0f3a6f1e167c5a627f7cd036c1d2b7d65.zip |
ASoC: mt6660: Keep the pm_runtime enables before component stuff in mt6660_i2c_probe
It would be better to keep the pm_runtime enables before the
IRQ and component stuff. Both of those could start triggering
PM runtime events.
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20221008140522.134912-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/mt6660.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/mt6660.c b/sound/soc/codecs/mt6660.c index 45e0df13afb9..b8369eeccc30 100644 --- a/sound/soc/codecs/mt6660.c +++ b/sound/soc/codecs/mt6660.c @@ -503,14 +503,14 @@ static int mt6660_i2c_probe(struct i2c_client *client) dev_err(chip->dev, "read chip revision fail\n"); goto probe_fail; } + pm_runtime_set_active(chip->dev); + pm_runtime_enable(chip->dev); ret = devm_snd_soc_register_component(chip->dev, &mt6660_component_driver, &mt6660_codec_dai, 1); - if (!ret) { - pm_runtime_set_active(chip->dev); - pm_runtime_enable(chip->dev); - } + if (ret) + pm_runtime_disable(chip->dev); return ret; |