From: Pierre-Louis Bossart Date: Tue, 26 Apr 2022 18:41:06 +0000 (-0500) Subject: ASoC: SOF: sof-client-ipc-msg-injector: use pm_runtime_resume_and_get() X-Git-Tag: v6.1-rc5~574^2~68^2~79^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02885dd831c043d4804dfc1d2942f2f4ec5fdc18;p=platform%2Fkernel%2Flinux-starfive.git ASoC: SOF: sof-client-ipc-msg-injector: 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-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/sof-client-ipc-msg-injector.c b/sound/soc/sof/sof-client-ipc-msg-injector.c index dba6cfd..c711981 100644 --- a/sound/soc/sof/sof-client-ipc-msg-injector.c +++ b/sound/soc/sof/sof-client-ipc-msg-injector.c @@ -83,10 +83,9 @@ static ssize_t sof_msg_inject_dfs_write(struct file *file, const char __user *bu if (size != count) return size > 0 ? -EFAULT : size; - ret = pm_runtime_get_sync(dev); + ret = pm_runtime_resume_and_get(dev); if (ret < 0 && ret != -EACCES) { dev_err_ratelimited(dev, "debugfs write failed to resume %d\n", ret); - pm_runtime_put_noidle(dev); return ret; }