From: Hyeonseong Gil Date: Tue, 27 Feb 2018 09:04:58 +0000 (+0900) Subject: [COMMON] cpufreq: acme: Use devdata from dm_scaler X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5b95ebb347fae78b514f7e904dbd67467693f7dc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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;