Skip to content

Commit 57ed510

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: qcom: 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> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220426235623.4253-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent fff1fd9 commit 57ed510

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

drivers/soundwire/qcom.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,11 @@ static irqreturn_t qcom_swrm_wake_irq_handler(int irq, void *dev_id)
510510
struct qcom_swrm_ctrl *swrm = dev_id;
511511
int ret;
512512

513-
ret = pm_runtime_get_sync(swrm->dev);
513+
ret = pm_runtime_resume_and_get(swrm->dev);
514514
if (ret < 0 && ret != -EACCES) {
515515
dev_err_ratelimited(swrm->dev,
516-
"pm_runtime_get_sync failed in %s, ret %d\n",
516+
"pm_runtime_resume_and_get failed in %s, ret %d\n",
517517
__func__, ret);
518-
pm_runtime_put_noidle(swrm->dev);
519518
return ret;
520519
}
521520

@@ -1059,12 +1058,11 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
10591058
struct snd_soc_dai *codec_dai;
10601059
int ret, i;
10611060

1062-
ret = pm_runtime_get_sync(ctrl->dev);
1061+
ret = pm_runtime_resume_and_get(ctrl->dev);
10631062
if (ret < 0 && ret != -EACCES) {
10641063
dev_err_ratelimited(ctrl->dev,
1065-
"pm_runtime_get_sync failed in %s, ret %d\n",
1064+
"pm_runtime_resume_and_get failed in %s, ret %d\n",
10661065
__func__, ret);
1067-
pm_runtime_put_noidle(ctrl->dev);
10681066
return ret;
10691067
}
10701068

@@ -1253,12 +1251,11 @@ static int swrm_reg_show(struct seq_file *s_file, void *data)
12531251
struct qcom_swrm_ctrl *swrm = s_file->private;
12541252
int reg, reg_val, ret;
12551253

1256-
ret = pm_runtime_get_sync(swrm->dev);
1254+
ret = pm_runtime_resume_and_get(swrm->dev);
12571255
if (ret < 0 && ret != -EACCES) {
12581256
dev_err_ratelimited(swrm->dev,
1259-
"pm_runtime_get_sync failed in %s, ret %d\n",
1257+
"pm_runtime_resume_and_get failed in %s, ret %d\n",
12601258
__func__, ret);
1261-
pm_runtime_put_noidle(swrm->dev);
12621259
return ret;
12631260
}
12641261

0 commit comments

Comments
 (0)