From 5b95ebb347fae78b514f7e904dbd67467693f7dc Mon Sep 17 00:00:00 2001 From: Hyeonseong Gil Date: Tue, 27 Feb 2018 18:04:58 +0900 Subject: [PATCH] [COMMON] cpufreq: acme: Use devdata from dm_scaler It can be used devdata directly from the sclaer function. Added devdata register at exynos_dm_data_init(). Change-Id: I35965a1e4011366b0e16af7e22f6312319b4363a Signed-off-by: Hyeonseong Gil --- drivers/cpufreq/exynos-acme.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/cpufreq/exynos-acme.c b/drivers/cpufreq/exynos-acme.c index 03815990469a..134d232f4e1a 100644 --- a/drivers/cpufreq/exynos-acme.c +++ b/drivers/cpufreq/exynos-acme.c @@ -76,19 +76,6 @@ exynos_cpufreq_domain *find_domain_cpumask(const struct cpumask *mask) return NULL; } -static -struct exynos_cpufreq_domain *find_domain_dm_type(enum exynos_dm_type dm_type) -{ - struct exynos_cpufreq_domain *domain; - - list_for_each_entry(domain, &domains, list) - if (domain->dm_type == dm_type) - return domain; - - pr_err("cannot find cpufreq domain by DVFS Manager type\n"); - return NULL; -} - static struct exynos_cpufreq_domain* first_domain(void) { return list_first_entry(&domains, @@ -524,10 +511,10 @@ static void update_dm_constraint(struct exynos_cpufreq_domain *domain, min(policy_max, pm_qos_max)); } -static int dm_scaler(enum exynos_dm_type dm_type, unsigned int target_freq, +static int dm_scaler(enum exynos_dm_type dm_type, void *devdata, unsigned int target_freq, unsigned int relation) { - struct exynos_cpufreq_domain *domain = find_domain_dm_type(dm_type); + struct exynos_cpufreq_domain *domain = devdata; struct cpufreq_policy *policy; struct cpumask mask; int ret; @@ -1382,7 +1369,7 @@ static int init_dm(struct exynos_cpufreq_domain *domain, if (ret) return ret; - ret = exynos_dm_data_init(domain->dm_type, domain->min_freq, + ret = exynos_dm_data_init(domain->dm_type, domain, domain->min_freq, domain->max_freq, domain->old); if (ret) return ret; -- 2.20.1