Commit 423a924e authored by Andres Salomon's avatar Andres Salomon Committed by Linus Torvalds

[PATCH] cpufreq_resume() fix

Since acpi_cpufreq_resume and speedstep_resume appear to return 0 upon
success, it seems like the attached patch is what the desired behavior
would be.  Otherwise, cpufreq_resume() always prints an error and exits
early if using a cpufreq_driver that supports resume.
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0fdb505b
......@@ -900,9 +900,12 @@ static int cpufreq_resume(struct sys_device * sysdev)
if (cpufreq_driver->resume) {
ret = cpufreq_driver->resume(cpu_policy);
printk(KERN_ERR "cpufreq: resume failed in ->resume step on CPU %u\n", cpu_policy->cpu);
if (ret) {
printk(KERN_ERR "cpufreq: resume failed in ->resume "
"step on CPU %u\n", cpu_policy->cpu);
cpufreq_cpu_put(cpu_policy);
return (ret);
return ret;
}
}
if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
......
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