diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2022-06-16 17:04:25 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-27 13:17:59 +0100 |
commit | 76a6f4537650e6d2211f34661de35630487c7c64 (patch) | |
tree | 5b8394804d7d64749357dd349ec86fdecdd3bec5 /sound/soc/rockchip/rockchip_pdm.c | |
parent | 57d714535051b1baca9ffd92e79fbda1fae3177a (diff) |
ASoC: rockchip: pdm: use pm_runtime_resume_and_get()
Simplify the flow.
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-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip/rockchip_pdm.c')
-rw-r--r-- | sound/soc/rockchip/rockchip_pdm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 64d9891b6434..066e29b7879d 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -688,11 +688,9 @@ static int rockchip_pdm_resume(struct device *dev) struct rk_pdm_dev *pdm = dev_get_drvdata(dev); int ret; - ret = pm_runtime_get_sync(dev); - if (ret < 0) { - pm_runtime_put(dev); + ret = pm_runtime_resume_and_get(dev); + if (ret < 0) return ret; - } ret = regcache_sync(pdm->regmap); |