From 67de7a9c1de067d7d58f4759dfd3191f9a2be0c9 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Fri, 30 Nov 2018 18:35:50 -0800 Subject: [PATCH] cpufreq: Kill userspace CPU boosting entirely Kernel-based CPU boosting is used now, so stop userspace from messing with it by turning scaling_min_freq into a no-op. Note that this is done instead of making scaling_min_freq read-only so that userspace doesn't spit out error messages when it can't do its boosting. Change-Id: I7c8f07cfc02ba719bfc883c9ecd2954f9cbda76f Signed-off-by: Sultan Alsawaf Signed-off-by: Richard Raya --- drivers/cpufreq/cpufreq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index f684ecc73185..39ca9fb292cd 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -696,6 +696,9 @@ static ssize_t store_##file_name \ int ret, temp; \ struct cpufreq_policy new_policy; \ \ + if (&policy->object == &policy->min) \ + return count; \ + \ memcpy(&new_policy, policy, sizeof(*policy)); \ new_policy.min = policy->user_policy.min; \ new_policy.max = policy->user_policy.max; \