Commit 30248fef authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

cpufreq: Make cpufreq_update_policy() void

The return value of cpufreq_update_policy() is never used, so make
it void.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent bca5f557
...@@ -2257,21 +2257,18 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, ...@@ -2257,21 +2257,18 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,
* Useful for policy notifiers which have different necessities * Useful for policy notifiers which have different necessities
* at different times. * at different times.
*/ */
int cpufreq_update_policy(unsigned int cpu) void cpufreq_update_policy(unsigned int cpu)
{ {
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
struct cpufreq_policy new_policy; struct cpufreq_policy new_policy;
int ret;
if (!policy) if (!policy)
return -ENODEV; return;
down_write(&policy->rwsem); down_write(&policy->rwsem);
if (policy_is_inactive(policy)) { if (policy_is_inactive(policy))
ret = -ENODEV;
goto unlock; goto unlock;
}
pr_debug("updating policy for CPU %u\n", cpu); pr_debug("updating policy for CPU %u\n", cpu);
memcpy(&new_policy, policy, sizeof(*policy)); memcpy(&new_policy, policy, sizeof(*policy));
...@@ -2283,24 +2280,20 @@ int cpufreq_update_policy(unsigned int cpu) ...@@ -2283,24 +2280,20 @@ int cpufreq_update_policy(unsigned int cpu)
* -> ask driver for current freq and notify governors about a change * -> ask driver for current freq and notify governors about a change
*/ */
if (cpufreq_driver->get && !cpufreq_driver->setpolicy) { if (cpufreq_driver->get && !cpufreq_driver->setpolicy) {
if (cpufreq_suspended) { if (cpufreq_suspended)
ret = -EAGAIN;
goto unlock; goto unlock;
}
new_policy.cur = cpufreq_update_current_freq(policy); new_policy.cur = cpufreq_update_current_freq(policy);
if (WARN_ON(!new_policy.cur)) { if (WARN_ON(!new_policy.cur))
ret = -EIO;
goto unlock; goto unlock;
} }
}
ret = cpufreq_set_policy(policy, &new_policy); cpufreq_set_policy(policy, &new_policy);
unlock: unlock:
up_write(&policy->rwsem); up_write(&policy->rwsem);
cpufreq_cpu_put(policy); cpufreq_cpu_put(policy);
return ret;
} }
EXPORT_SYMBOL(cpufreq_update_policy); EXPORT_SYMBOL(cpufreq_update_policy);
......
...@@ -175,7 +175,7 @@ void disable_cpufreq(void); ...@@ -175,7 +175,7 @@ void disable_cpufreq(void);
u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy); u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy);
int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
int cpufreq_update_policy(unsigned int cpu); void cpufreq_update_policy(unsigned int cpu);
bool have_governor_per_policy(void); bool have_governor_per_policy(void);
struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy); struct kobject *get_governor_parent_kobj(struct cpufreq_policy *policy);
void cpufreq_enable_fast_switch(struct cpufreq_policy *policy); void cpufreq_enable_fast_switch(struct cpufreq_policy *policy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment