From: Magnus Damm <magnus.damm@gmail.com>
To: linux-pm@lists.linux-foundation.org
Cc: gregkh@suse.de
Subject: [PATCH 02/05] PM: Runtime PM v13 - let bus-less devices succeed
Date: Fri, 07 Aug 2009 16:33:33 +0900 [thread overview]
Message-ID: <20090807073333.22479.65407.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20090807073315.22479.89012.sendpatchset@rx1.opensource.se>
From: Magnus Damm <damm@igel.co.jp>
This patch allows bus-less devices to pass as being
suspended even though there is no dev_pm_ops structure
to use to get the Runtime PM callbacks.
Workarounds the fact that "struct device platform_bus"
becomes the parent of otherwise parent-less platform
devices. Runtime suspend and resume of devices on the
platform bus is impossible without this change. It may
however be better to modify the actual struct device
than working around things in the Runtime PM core code.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
Please let me know if this Runtime PM core change is acceptable.
Changes for v11->v13:
- none
drivers/base/power/runtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- 0008/drivers/base/power/runtime.c
+++ work/drivers/base/power/runtime.c 2009-08-07 13:45:22.000000000 +0900
@@ -174,7 +174,7 @@ int __pm_runtime_suspend(struct device *
spin_unlock_irq(&dev->power.lock);
- retval = dev->bus ? pm_runtime_ops_suspend(dev, dev->bus->pm) : -ENOSYS;
+ retval = dev->bus ? pm_runtime_ops_suspend(dev, dev->bus->pm) : 0;
spin_lock_irq(&dev->power.lock);
@@ -329,7 +329,7 @@ int __pm_runtime_resume(struct device *d
spin_unlock_irq(&dev->power.lock);
- retval = dev->bus ? pm_runtime_ops_resume(dev, dev->bus->pm) : -ENOSYS;
+ retval = dev->bus ? pm_runtime_ops_resume(dev, dev->bus->pm) : 0;
spin_lock_irq(&dev->power.lock);
next prev parent reply other threads:[~2009-08-07 7:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 7:33 [PATCH 00/05] PM: Runtime PM v13 for Platform Devices 20090807 Magnus Damm
2009-08-07 7:33 ` [PATCH 01/05] PM: Runtime PM v13 - add dev_pm_ops helpers Magnus Damm
2009-08-07 7:33 ` Magnus Damm [this message]
2009-08-07 7:33 ` [PATCH 03/05] PM: Runtime PM v13 - add debug printouts Magnus Damm
2009-08-08 13:28 ` Rafael J. Wysocki
2009-08-07 7:33 ` [PATCH 04/05] PM: Runtime PM v13 - CONFIG_PM_SLEEP=n support Magnus Damm
2009-08-07 7:34 ` [PATCH 05/05] PM: Runtime PM v13 - platform device bus support Magnus Damm
2009-08-07 14:32 ` [PATCH 00/05] PM: Runtime PM v13 for Platform Devices 20090807 Alan Stern
2009-08-07 15:42 ` Magnus Damm
2009-08-07 16:17 ` Alan Stern
2009-08-08 13:47 ` Rafael J. Wysocki
2009-08-10 10:57 ` Magnus Damm
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=20090807073333.22479.65407.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-pm@lists.linux-foundation.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