lkml.org 
[lkml]   [2005]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] cpufreq resume fix?
From
Date
Hi,

I noticed in the following changeset, the cpufreq_driver->resume call
semantics looked a little odd:
http://linux.bkbits.net:8080/linux-2.6/gnupatch@41d25ff3DyITFVz4Jm34PpluFPlt-g

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.


--
Andres Salomon <dilinger@voxel.net>
--- orig/drivers/cpufreq/cpufreq.c 2005-01-31 01:04:17.503452072 -0500
+++ mod/drivers/cpufreq/cpufreq.c 2005-01-31 01:05:15.992560376 -0500
@@ -900,9 +900,11 @@

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);
- cpufreq_cpu_put(cpu_policy);
- return (ret);
+ 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);
+ }
}

if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.017 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site