diff mbox series

remoteproc: qcom: using pm_runtime_resume_and_get to simplify the code

Message ID 20220420030511.2575880-1-chi.minghao@zte.com.cn (mailing list archive)
State Superseded
Headers show
Series remoteproc: qcom: using pm_runtime_resume_and_get to simplify the code | expand

Commit Message

CGEL April 20, 2022, 3:05 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn>

Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/remoteproc/qcom_wcnss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 9a223d394087..2c471c763b5b 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -228,11 +228,9 @@  static int wcnss_start(struct rproc *rproc)
 
 	for (i = 0; i < wcnss->num_pds; i++) {
 		dev_pm_genpd_set_performance_state(wcnss->pds[i], INT_MAX);
-		ret = pm_runtime_get_sync(wcnss->pds[i]);
-		if (ret < 0) {
-			pm_runtime_put_noidle(wcnss->pds[i]);
+		ret = pm_runtime_resume_and_get(wcnss->pds[i]);
+		if (ret < 0)
 			goto disable_pds;
-		}
 	}
 
 	ret = regulator_bulk_enable(wcnss->num_vregs, wcnss->vregs);