From: Magnus Damm <magnus.damm@gmail.com>
To: linux-pm@lists.linux-foundation.org
Cc: gregkh@suse.de
Subject: [PATCH 04/04] PM: Runtime PM v11 - CONFIG_PM_SLEEP=n support
Date: Fri, 31 Jul 2009 21:27:18 +0900 [thread overview]
Message-ID: <20090731122718.31004.84809.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20090731122639.31004.95390.sendpatchset@rx1.opensource.se>
From: Magnus Damm <damm@igel.co.jp>
This patch contains a few fixes to allow Runtime PM
to be used even though suspend and hibernation are disabled
in the kconfig. Without this patch the Runtime PM code
compiles just fine with CONFIG_PM_SLEEP=n but the functions
pm_runtime_init() and pm_runtime_remove() never gets called
during runtime.
Not sure if CONFIG_PM_RUNTIME=y and CONFIG_PM_SLEEP=n really
is a valid combination, but I can easily imagine use cases
for Runtime PM without system suspend/hibernation support.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/base/core.c | 3 +++
drivers/base/power/main.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
--- 0001/drivers/base/core.c
+++ work/drivers/base/core.c 2009-07-31 19:52:26.000000000 +0900
@@ -23,6 +23,7 @@
#include <linux/semaphore.h>
#include <linux/mutex.h>
#include <linux/async.h>
+#include <linux/pm_runtime.h>
#include "base.h"
#include "power/power.h"
@@ -555,6 +556,7 @@ void device_initialize(struct device *de
INIT_LIST_HEAD(&dev->devres_head);
device_init_wakeup(dev, 0);
device_pm_init(dev);
+ pm_runtime_init(dev);
set_dev_node(dev, -1);
}
@@ -1063,6 +1065,7 @@ void device_del(struct device *dev)
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
BUS_NOTIFY_DEL_DEVICE, dev);
device_pm_remove(dev);
+ pm_runtime_remove(dev);
dpm_sysfs_remove(dev);
if (parent)
klist_del(&dev->p->knode_parent);
--- 0015/drivers/base/power/main.c
+++ work/drivers/base/power/main.c 2009-07-31 19:52:26.000000000 +0900
@@ -56,7 +56,6 @@ static bool transition_started;
void device_pm_init(struct device *dev)
{
dev->power.status = DPM_ON;
- pm_runtime_init(dev);
}
/**
@@ -116,8 +115,6 @@ void device_pm_remove(struct device *dev
mutex_lock(&dpm_list_mtx);
list_del_init(&dev->power.entry);
mutex_unlock(&dpm_list_mtx);
-
- pm_runtime_remove(dev);
}
/**
prev parent reply other threads:[~2009-07-31 12:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 12:26 [PATCH 00/04] PM: Runtime PM v11 patches 20090731 Magnus Damm
2009-07-31 12:26 ` [PATCH 01/04] PM: Runtime PM v11 - add dev_pm_ops helpers Magnus Damm
2009-07-31 12:26 ` [PATCH 02/04] PM: Runtime PM v11 - let bus-less devices succeed Magnus Damm
2009-07-31 12:27 ` [PATCH 03/04] PM: Runtime PM v11 - add debug printouts Magnus Damm
2009-07-31 12:27 ` Magnus Damm [this message]
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=20090731122718.31004.84809.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