login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
November
»
30
Re: [PATCH] PM: Prevent dpm_prepare() from returning errors unnecessarily
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Rafael J. Wysocki
Subject:
Re: [PATCH] PM: Prevent dpm_prepare() from returning errors unnecessarily
Date: Tuesday, November 30, 2010 - 3:23 pm
On Tuesday, November 30, 2010, Ming Lei wrote:
quoted text
> 2010/11/28 Rafael J. Wysocki <rjw@sisk.pl>: > > From: Rafael J. Wysocki <rjw@sisk.pl> > > > > Currently dpm_prepare() returns error code if it finds that a device > > being suspended has a pending runtime resume request. However, it > > should not do that if the checking for wakeup events is not enabled. > > On the other hand, if the checking for wakeup events is enabled, it > > can return error when a wakeup event is detected, regardless of its > > source. > > > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> > > --- > > drivers/base/power/main.c | 11 +++++++---- > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > Index: linux-2.6/drivers/base/power/main.c > > =================================================================== > > --- linux-2.6.orig/drivers/base/power/main.c > > +++ linux-2.6/drivers/base/power/main.c > > @@ -26,6 +26,7 @@ > > #include <linux/interrupt.h> > > #include <linux/sched.h> > > #include <linux/async.h> > > +#include <linux/suspend.h> > > > > #include "../base.h" > > #include "power.h" > > @@ -1052,8 +1053,10 @@ static int dpm_prepare(pm_message_t stat > > mutex_unlock(&dpm_list_mtx); > > > > pm_runtime_get_noresume(dev); > > - if (pm_runtime_barrier(dev) && device_may_wakeup(dev)) { > > - /* Wake-up requested during system sleep transition. */ > > + if (pm_runtime_barrier(dev) && device_may_wakeup(dev)) > > + pm_wakeup_event(dev, 0); > > + > > + if (pm_check_wakeup_events()) { > > If pm_check_wakeup_events returns true, it means there is no wakeup event > coming, so seems should handle normal suspend prepare, but why > abort the suspend here?
That's a bug, it should be !pm_check_wakeup_events() instead. Thanks, Rafael --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] PM: Prevent dpm_prepare() from returning errors un ...
, Rafael J. Wysocki
, (Sun Nov 28, 5:12 am)
Re: [PATCH] PM: Prevent dpm_prepare() from returning error ...
, Ming Lei
, (Tue Nov 30, 6:07 am)
Re: [PATCH] PM: Prevent dpm_prepare() from returning error ...
, Rafael J. Wysocki
, (Tue Nov 30, 3:23 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Eric Sandeen
Re: [PATCH] xfs: do not pass unused params to xfs_flush_pages
Daniel Hazelton
Re: x86: 4kstacks default
Rusty Russell
Re: 2.6.22-rc3-mm1
Jeffrey V. Merkey
Re: Versioning file system
Matt Mackall
Re: [RFD] Documentation/HOWTO translated into Japanese
linux-netdev
:
gregkh
Patch "IPv6: keep route for tentative address" has been added to the 2.6.34-stable...
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
Paul Gortmaker
[PATCH net-next 09/16] tipc: Relocate trivial link status functions to header file
webmaster Maintenance
&#32852;&#31995;&#31995;&#32479;&#31649;&#29702;&#21592;
git
:
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Junio C Hamano
Re: [PATCH] http-push: making HTTP push more robust and more user-friendly
Oliver Kullmann
Re: how to move with history?
Alex Riesen
Re: git exclude patterns for directory
Andreas Ericsson
Re: why not TortoiseGit
openbsd-misc
:
Damien Miller
Re: Patching a SSH 'Weakness'
Stuart Henderson
Re: Apache Seg Fault after upgrade to 4.6 stable
Úlfar M. E. Johnson
installing openbsd in xen
Brian
CARP multicast and ADSL bridge
Eric Furman
Re: Defending OpenBSD Performance
git-commits-head
:
Linux Kernel Mailing List
New device ID for sc92031 [1088:2031]
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
Staging: et131x: prune all the debug code
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
USB: g_multi: Multifunction Composite Gadget added
Colocation donated by:
Syndicate