public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@voxel.net>
To: Dominik Brodowski <linux@brodo.de>
Cc: Dave Jones <davej@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] cpufreq resume fix?
Date: Mon, 31 Jan 2005 01:07:30 -0500	[thread overview]
Message-ID: <1107151650.12847.6.camel@localhost> (raw)


[-- 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 --]

                 reply	other threads:[~2005-01-31  6:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1107151650.12847.6.camel@localhost \
    --to=dilinger@voxel.net \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@brodo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox