ASoC: SOF: ipc3-dtrace: use pm_runtime_resume_and_get()
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 10 Jun 2022 07:12:45 +0000 (10:12 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 10 Jun 2022 12:32:22 +0000 (13:32 +0100)
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 <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220610071245.26576-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc3-dtrace.c

index b4e1343..45bf9c5 100644 (file)
@@ -157,9 +157,8 @@ static int ipc3_trace_update_filter(struct snd_sof_dev *sdev, int num_elems,
        msg->elem_cnt = num_elems;
        memcpy(&msg->elems[0], elems, num_elems * sizeof(*elems));
 
-       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, "enabling device failed: %d\n", ret);
                goto error;
        }