From 5b465b045af3a649a89b8a5c5bfdece20ffc0345 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Sat, 17 Sep 2016 02:25:44 -0300 Subject: Linux-libre 4.7.4-gnu --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 ++ drivers/cpufreq/cpufreq.c | 6 +----- drivers/cpufreq/intel_pstate.c | 9 ++------- 3 files changed, 5 insertions(+), 12 deletions(-) (limited to 'drivers/cpufreq') 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 #include #include -#include #include #include #include @@ -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; } -- cgit v1.2.3-54-g00ecf