From c444232389303633d877c2de1996651752665d68 Mon Sep 17 00:00:00 2001 From: Youngtae Lee Date: Wed, 16 May 2018 13:42:25 +0900 Subject: [PATCH] cpufrqe: acme: remove exynos_cpufreq_allow_change_max. Change-Id: Ibe558896a0fdd3c7daf8f844a8bff50bc54348f8 Signed-off-by: Youngtae Lee --- drivers/cpufreq/exynos-acme.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/cpufreq/exynos-acme.c b/drivers/cpufreq/exynos-acme.c index f1fbecf3827a..0d239f6a8ee9 100644 --- a/drivers/cpufreq/exynos-acme.c +++ b/drivers/cpufreq/exynos-acme.c @@ -426,16 +426,6 @@ static int exynos_cpufreq_target(struct cpufreq_policy *policy, return DM_CALL(domain->dm_type, &freq); } -static unsigned int exynos_cpufreq_get(unsigned int cpu) -{ - struct exynos_cpufreq_domain *domain = find_domain(cpu); - - if (!domain) - return 0; - - return get_freq(domain); -} - static int __exynos_cpufreq_suspend(struct exynos_cpufreq_domain *domain) { unsigned int freq; @@ -526,6 +516,7 @@ static struct notifier_block exynos_cpufreq_pm = { .notifier_call = exynos_cpufreq_pm_notifier, }; +unsigned int exynos_cpufreq_get(unsigned int cpu); static struct cpufreq_driver exynos_driver = { .name = "exynos_cpufreq", .flags = CPUFREQ_STICKY | CPUFREQ_HAVE_GOVERNOR_PER_POLICY, @@ -765,16 +756,14 @@ unsigned int exynos_cpufreq_get_max_freq(struct cpumask *mask) } EXPORT_SYMBOL(exynos_cpufreq_get_max_freq); -bool exynos_cpufreq_allow_change_max(unsigned int cpu, unsigned long max) +unsigned int exynos_cpufreq_get(unsigned int cpu) { struct exynos_cpufreq_domain *domain = find_domain(cpu); - bool allow; - mutex_lock(&domain->lock); - allow = domain->old <= max; - mutex_unlock(&domain->lock); + if (!domain) + return 0; - return allow; + return get_freq(domain); } /********************************************************************* -- 2.20.1