* [PATCH] cpufreq resume fix?
@ 2005-01-31 6:07 Andres Salomon
0 siblings, 0 replies; only message in thread
From: Andres Salomon @ 2005-01-31 6:07 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: Dave Jones, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 510 bytes --]
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>
[-- Attachment #1.2: cpufreq.patch --]
[-- Type: text/x-patch, Size: 624 bytes --]
--- 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)) {
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-31 6:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-31 6:07 [PATCH] cpufreq resume fix? Andres Salomon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).