mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
pmdomain: rockchip: reduce indentation in rockchip_pd_power
Rework the logic, so that the function exits early when the power domain state is already correct to reduce code indentation. No functional change intended. Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Adrian Larumbe <adrian.larumbe@collabora.com> # On Rock 5B Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20250220-rk3588-gpu-pwr-domain-regulator-v6-4-a4f9c24e5b81@kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
7ab6c930b9
commit
edcef66707
|
|
@ -592,7 +592,9 @@ static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)
|
||||||
|
|
||||||
guard(mutex)(&pmu->mutex);
|
guard(mutex)(&pmu->mutex);
|
||||||
|
|
||||||
if (rockchip_pmu_domain_is_on(pd) != power_on) {
|
if (rockchip_pmu_domain_is_on(pd) == power_on)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = clk_bulk_enable(pd->num_clks, pd->clks);
|
ret = clk_bulk_enable(pd->num_clks, pd->clks);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(pmu->dev, "failed to enable clocks\n");
|
dev_err(pmu->dev, "failed to enable clocks\n");
|
||||||
|
|
@ -623,7 +625,6 @@ static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)
|
||||||
|
|
||||||
rockchip_pmu_ungate_clk(pd, false);
|
rockchip_pmu_ungate_clk(pd, false);
|
||||||
clk_bulk_disable(pd->num_clks, pd->clks);
|
clk_bulk_disable(pd->num_clks, pd->clks);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user