summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq-dt-platdev.c2
-rw-r--r--drivers/cpufreq/cpufreq.c6
-rw-r--r--drivers/cpufreq/intel_pstate.c9
3 files changed, 5 insertions, 12 deletions
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 0bb44d5b5..2ee40fd36 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -74,6 +74,8 @@ static const struct of_device_id machines[] __initconst = {
{ .compatible = "ti,omap5", },
{ .compatible = "xlnx,zynq-7000", },
+
+ { }
};
static int __init cpufreq_dt_platdev_init(void)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index d41baadec..5617c7087 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -25,7 +25,6 @@
#include <linux/kernel_stat.h>
#include <linux/module.h>
#include <linux/mutex.h>
-#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/suspend.h>
#include <linux/syscore_ops.h>
@@ -1931,11 +1930,8 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
return -ENODEV;
/* Make sure that target_freq is within supported range */
- if (target_freq >= policy->max) {
+ if (target_freq > policy->max)
target_freq = policy->max;
- cpu_nonscaling(policy->cpu);
- } else
- cpu_scaling(policy->cpu);
if (target_freq < policy->min)
target_freq = policy->min;
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 1ccb70e0c..1b159171f 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -853,13 +853,8 @@ static u64 atom_get_val(struct cpudata *cpudata, int pstate)
vid_fp = clamp_t(int32_t, vid_fp, cpudata->vid.min, cpudata->vid.max);
vid = ceiling_fp(vid_fp);
- if (pstate < cpudata->pstate.max_pstate)
- cpu_scaling(cpudata->cpu);
- else {
- if (pstate > cpudata->pstate.max_pstate)
- vid = cpudata->vid.turbo;
- cpu_nonscaling(cpudata->cpu);
- }
+ if (pstate > cpudata->pstate.max_pstate)
+ vid = cpudata->vid.turbo;
return val | vid;
}