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