From: Todd Poynor <tpoynor@mvista.com>
To: Felipe Alfaro Solana <felipe_alfaro@linuxmail.org>,
Andrew Morton <akpm@osdl.org>,
greg@kroah.com
Cc: Kernel Mailinglist <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.7-rc1-mm1: revert leave-runtime-suspended-devices-off-at-system-resume.patch
Date: Fri, 28 May 2004 11:54:59 -0700 [thread overview]
Message-ID: <20040528185459.GG7176@slurryseal.ddns.mvista.com> (raw)
In-Reply-To: <1085742197.1684.0.camel@teapot.felipe-alfaro.com>
A patch to fix my previous
leave-runtime-suspended-devices-off-at-system-resume patch; the new
changes save a copy of power.power_state in order to know whether to
resume a device, independently of mods to that field by a driver suspend
routine. This fixes 2.6.7-rc1-mm1 in the same fashion as the updated
2.6.6 patch sent previously. Thanks -- Todd
--- linux-2.6.7-rc1-mm1.orig/drivers/base/power/suspend.c 2004-05-27 12:18:53.000000000 -0700
+++ linux-2.6.7-rc1-mm1.pm/drivers/base/power/suspend.c 2004-05-28 11:08:10.486982568 -0700
@@ -39,6 +39,8 @@
{
int error = 0;
+ dev->power.prev_state = dev->power.power_state;
+
if (dev->bus && dev->bus->suspend && !dev->power.power_state)
error = dev->bus->suspend(dev,state);
--- linux-2.6.7-rc1-mm1.orig/drivers/base/power/resume.c 2004-05-27 12:18:53.000000000 -0700
+++ linux-2.6.7-rc1-mm1.pm/drivers/base/power/resume.c 2004-05-28 11:10:43.792676560 -0700
@@ -36,7 +36,7 @@
struct device * dev = to_device(entry);
list_del_init(entry);
- if (!dev->power.power_state)
+ if (!dev->power.prev_state)
resume_device(dev);
list_add_tail(entry,&dpm_active);
--- linux-2.6.7-rc1-mm1.orig/include/linux/pm.h 2004-05-27 12:16:59.000000000 -0700
+++ linux-2.6.7-rc1-mm1.pm/include/linux/pm.h 2004-05-28 11:11:50.792491040 -0700
@@ -231,6 +231,7 @@
struct dev_pm_info {
u32 power_state;
#ifdef CONFIG_PM
+ u32 prev_state;
u8 * saved_state;
atomic_t pm_users;
struct device * pm_parent;
next prev parent reply other threads:[~2004-05-28 18:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-27 11:49 Felipe Alfaro Solana
2004-05-27 23:34 ` Todd Poynor
2004-05-28 11:03 ` Felipe Alfaro Solana
2004-05-28 18:54 ` Todd Poynor [this message]
2004-05-28 20:20 ` Greg KH
2004-05-28 21:17 ` Felipe Alfaro Solana
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=20040528185459.GG7176@slurryseal.ddns.mvista.com \
--to=tpoynor@mvista.com \
--cc=akpm@osdl.org \
--cc=felipe_alfaro@linuxmail.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®