diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2022-04-27 02:56:22 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-05-09 09:32:29 +0300 |
commit | fff1fd9c1b42b1d8a9dda8d50553543e5d5f5368 (patch) | |
tree | c42164dfc475ac636fb5fb50f11c3ca877011b78 /drivers/soundwire | |
parent | 915bf27a46bb4e7d330fb384f47853ccd28e5564 (diff) | |
download | linux-fff1fd9c1b42b1d8a9dda8d50553543e5d5f5368.tar.xz |
soundwire: intel: 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>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426235623.4253-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r-- | drivers/soundwire/intel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 4b458e5e7336..505c5ef061e3 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -799,12 +799,11 @@ static int intel_startup(struct snd_pcm_substream *substream, struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai); int ret; - ret = pm_runtime_get_sync(cdns->dev); + ret = pm_runtime_resume_and_get(cdns->dev); if (ret < 0 && ret != -EACCES) { dev_err_ratelimited(cdns->dev, - "pm_runtime_get_sync failed in %s, ret %d\n", + "pm_runtime_resume_and_get failed in %s, ret %d\n", __func__, ret); - pm_runtime_put_noidle(cdns->dev); return ret; } return 0; |