From 300db31c73efb5897de548e9dcf298207c5a3faa Mon Sep 17 00:00:00 2001 From: Finley Xiao Date: Tue, 3 Sep 2024 16:58:23 +0800 Subject: [PATCH] cpufreq: dt: Fix crash when cpu offline at low temperature Signed-off-by: Finley Xiao Change-Id: Ic7d363581468990993369a999a7157e6bd10817e --- drivers/cpufreq/cpufreq-dt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 646ec616ae52..7bd9c1726273 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -160,12 +160,18 @@ out_clk_put: static int cpufreq_online(struct cpufreq_policy *policy) { +#ifdef CONFIG_ARCH_ROCKCHIP + return rockchip_cpufreq_online(policy->cpu); +#endif /* We did light-weight tear down earlier, nothing to do here */ return 0; } static int cpufreq_offline(struct cpufreq_policy *policy) { +#ifdef CONFIG_ARCH_ROCKCHIP + return rockchip_cpufreq_offline(policy->cpu); +#endif /* * Preserve policy->driver_data and don't free resources on light-weight * tear down.