From: Pierre-Louis Bossart Date: Tue, 26 Apr 2022 18:41:04 +0000 (-0500) Subject: ASoC: SOF: debug: use pm_runtime_resume_and_get() X-Git-Tag: v6.1-rc5~574^2~68^2~79^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c106f46e83fd15c34cfa0a68e8218f5cb4844dd3;p=platform%2Fkernel%2Flinux-starfive.git ASoC: SOF: debug: use pm_runtime_resume_and_get() Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and pm_runtime_put_noidle() pattern. No functional changes. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220426184106.102636-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index b59619e..54d3643 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -229,9 +229,8 @@ static int memory_info_update(struct snd_sof_dev *sdev, char *buf, size_t buff_s if (!reply) return -ENOMEM; - ret = pm_runtime_get_sync(sdev->dev); + ret = pm_runtime_resume_and_get(sdev->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_noidle(sdev->dev); dev_err(sdev->dev, "error: enabling device failed: %d\n", ret); goto error; }