[PATCH] remoteproc: qcom: using pm_runtime_resume_and_get to simplify the code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Minghao Chi <chi.minghao@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx>
---
 drivers/remoteproc/qcom_wcnss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

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);
-- 
2.25.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux