ASoC: SOF: sof-client-ipc-flood-test: 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 <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>
Link: https://lore.kernel.org/r/20220517173715.468894-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Pierre-Louis Bossart 2022-05-17 12:37:15 -05:00 committed by Mark Brown
parent 0f653c95c4
commit b1378b259c
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -217,10 +217,9 @@ static ssize_t sof_ipc_flood_dfs_write(struct file *file, const char __user *buf
ipc_count = MAX_IPC_FLOOD_COUNT; ipc_count = MAX_IPC_FLOOD_COUNT;
} }
ret = pm_runtime_get_sync(dev); ret = pm_runtime_resume_and_get(dev);
if (ret < 0 && ret != -EACCES) { if (ret < 0 && ret != -EACCES) {
dev_err_ratelimited(dev, "debugfs write failed to resume %d\n", ret); dev_err_ratelimited(dev, "debugfs write failed to resume %d\n", ret);
pm_runtime_put_noidle(dev);
goto out; goto out;
} }