aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/s5pv210-cpufreq.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2020-06-06 10:45:37 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-06-06 10:45:37 -0700
commit8dd06ef34b6e2f41b29fbf5fc1663780f2524285 (patch)
treed59152f37ea7b36c3cf1778e20b85239f89c4e77 /drivers/cpufreq/s5pv210-cpufreq.c
parentInput: synaptics - add a second working PNP_ID for Lenovo T470s (diff)
parentInput: iqs269a - add missing I2C dependency (diff)
downloadlinux-dev-8dd06ef34b6e2f41b29fbf5fc1663780f2524285.tar.xz
linux-dev-8dd06ef34b6e2f41b29fbf5fc1663780f2524285.zip
Merge branch 'next' into for-linus
Prepare input updates for 5.8 merge window.
Diffstat (limited to 'drivers/cpufreq/s5pv210-cpufreq.c')
-rw-r--r--drivers/cpufreq/s5pv210-cpufreq.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
index 5d10030f2560..e84281e2561d 100644
--- a/drivers/cpufreq/s5pv210-cpufreq.c
+++ b/drivers/cpufreq/s5pv210-cpufreq.c
@@ -555,8 +555,17 @@ static int s5pv210_cpufreq_reboot_notifier_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
int ret;
+ struct cpufreq_policy *policy;
+
+ policy = cpufreq_cpu_get(0);
+ if (!policy) {
+ pr_debug("cpufreq: get no policy for cpu0\n");
+ return NOTIFY_BAD;
+ }
+
+ ret = cpufreq_driver_target(policy, SLEEP_FREQ, 0);
+ cpufreq_cpu_put(policy);
- ret = cpufreq_driver_target(cpufreq_cpu_get(0), SLEEP_FREQ, 0);
if (ret < 0)
return NOTIFY_BAD;