diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-02-22 06:06:42 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-03-09 08:41:11 -0500 |
commit | 11eb69b984aae216ae43c79d2d43441ee68a63ca (patch) | |
tree | b685ddce32e9bad5297779aaac6c9b30fe500056 /drivers/cpufreq/cpufreq.c | |
parent | f737236b128cac7c355d0650a98c42ae4313f3f1 (diff) |
cpufreq: Relocate handle_update() to kill its declaration
handle_update() is declared at the top of the file as its user appear
before its definition. Relocate the routine to get rid of this.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index bc93272b4a12..316beffc960a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -159,7 +159,6 @@ static inline bool has_target(void) | |||
159 | static int __cpufreq_governor(struct cpufreq_policy *policy, | 159 | static int __cpufreq_governor(struct cpufreq_policy *policy, |
160 | unsigned int event); | 160 | unsigned int event); |
161 | static unsigned int __cpufreq_get(struct cpufreq_policy *policy); | 161 | static unsigned int __cpufreq_get(struct cpufreq_policy *policy); |
162 | static void handle_update(struct work_struct *work); | ||
163 | 162 | ||
164 | /** | 163 | /** |
165 | * Two notifier lists: the "policy" list is involved in the | 164 | * Two notifier lists: the "policy" list is involved in the |
@@ -1072,6 +1071,15 @@ unlock: | |||
1072 | return ret; | 1071 | return ret; |
1073 | } | 1072 | } |
1074 | 1073 | ||
1074 | static void handle_update(struct work_struct *work) | ||
1075 | { | ||
1076 | struct cpufreq_policy *policy = | ||
1077 | container_of(work, struct cpufreq_policy, update); | ||
1078 | unsigned int cpu = policy->cpu; | ||
1079 | pr_debug("handle_update for cpu %u called\n", cpu); | ||
1080 | cpufreq_update_policy(cpu); | ||
1081 | } | ||
1082 | |||
1075 | static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu) | 1083 | static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu) |
1076 | { | 1084 | { |
1077 | struct device *dev = get_cpu_device(cpu); | 1085 | struct device *dev = get_cpu_device(cpu); |
@@ -1453,15 +1461,6 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) | |||
1453 | cpufreq_policy_free(policy, true); | 1461 | cpufreq_policy_free(policy, true); |
1454 | } | 1462 | } |
1455 | 1463 | ||
1456 | static void handle_update(struct work_struct *work) | ||
1457 | { | ||
1458 | struct cpufreq_policy *policy = | ||
1459 | container_of(work, struct cpufreq_policy, update); | ||
1460 | unsigned int cpu = policy->cpu; | ||
1461 | pr_debug("handle_update for cpu %u called\n", cpu); | ||
1462 | cpufreq_update_policy(cpu); | ||
1463 | } | ||
1464 | |||
1465 | /** | 1464 | /** |
1466 | * cpufreq_out_of_sync - If actual and saved CPU frequency differs, we're | 1465 | * cpufreq_out_of_sync - If actual and saved CPU frequency differs, we're |
1467 | * in deep trouble. | 1466 | * in deep trouble. |