Skip to content

Commit d43b3a9

Browse files
committed
soc: qcom: rpmhpd: Use corner in power_off
rpmhpd_aggregate_corner() takes a corner as parameter, but in rpmhpd_power_off() the code requests the level of the first corner instead. In all (known) current cases the first corner has level 0, so this change should be a nop, but in case that there's a power domain with a non-zero lowest level this makes sure that rpmhpd_power_off() actually requests the lowest level - which is the closest to "power off" we can get. While touching the code, also skip the unnecessary zero-initialization of "ret". Fixes: 279b7e8 ("soc: qcom: rpmhpd: Add RPMh power domain driver") Reviewed-by: Rajendra Nayak <rnayak@codeaurora.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Sibi Sankar <sibis@codeaurora.org> Tested-by: Sibi Sankar <sibis@codeaurora.org> Link: https://lore.kernel.org/r/20210703005416.2668319-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
1 parent d63486d commit d43b3a9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/soc/qcom/rpmhpd.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,11 @@ static int rpmhpd_power_on(struct generic_pm_domain *domain)
403403
static int rpmhpd_power_off(struct generic_pm_domain *domain)
404404
{
405405
struct rpmhpd *pd = domain_to_rpmhpd(domain);
406-
int ret = 0;
406+
int ret;
407407

408408
mutex_lock(&rpmhpd_lock);
409409

410-
ret = rpmhpd_aggregate_corner(pd, pd->level[0]);
411-
410+
ret = rpmhpd_aggregate_corner(pd, 0);
412411
if (!ret)
413412
pd->enabled = false;
414413

0 commit comments

Comments
 (0)