From: Rickard Andersson <rickard.andersson@stericsson.com>
To: rjw@sisk.pl, linux-pm@vger.kernel.org
Cc: daniel.lezcano@linaro.org, hongbo.zhang@linaro.org,
khilman@linaro.org, ulf.hansson@linaro.org,
linus.walleij@stericsson.com, rickard.andersson@stericsson.com
Subject: [RFC PATCH 4/8] PM / Domains: Lookup domain by name
Date: Fri, 22 Mar 2013 17:20:08 +0100 [thread overview]
Message-ID: <1363969212-14864-5-git-send-email-rickard.andersson@stericsson.com> (raw)
In-Reply-To: <1363969212-14864-1-git-send-email-rickard.andersson@stericsson.com>
Make the function pm_genpd_lookup_name(..) non
static. This is done to limit the need for "name
functions" as e.g. pm_genpd_name_attach_cpuidle.
Also the name lookup takes a mutex and should not
be called when IRQ's are off. So by exporting this
function the name lookup can be done before IRQ's
are off.
Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com>
---
drivers/base/power/domain.c | 2 +-
include/linux/pm_domain.h | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 91e3b7d..a8755cb 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -53,7 +53,7 @@
static LIST_HEAD(gpd_list);
static DEFINE_MUTEX(gpd_list_lock);
-static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
+struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
{
struct generic_pm_domain *genpd = NULL, *gpd;
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index bf5e7d514..0fa2d5e 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -129,7 +129,7 @@ static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
}
extern struct dev_power_governor simple_qos_governor;
-
+extern struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name);
extern struct generic_pm_domain *dev_to_genpd(struct device *dev);
extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
struct device *dev,
@@ -181,6 +181,10 @@ static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
{
return ERR_PTR(-ENOSYS);
}
+static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
+{
+ return ERR_PTR(-ENOSYS);
+}
static inline struct generic_pm_domain *dev_to_genpd(struct device *dev)
{
return ERR_PTR(-ENOSYS);
--
1.8.2
next prev parent reply other threads:[~2013-03-22 16:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 16:20 [RFC PATCH 0/8] ux500 suspend-resume Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 1/8] mfd: db8500: Add IO force function Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 2/8] ARM: ux500: Add platform suspend ops Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 3/8] PM / Domains: Add on-off notifiers Rickard Andersson
2013-03-22 16:20 ` Rickard Andersson [this message]
2013-03-22 16:20 ` [RFC PATCH 5/8] ARM: ux500: Create APE generic power domain Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 6/8] clk: ux500: Add PRCC power management Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 7/8] ARM: ux500: Create u8500-clk device Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 8/8] ARM: ux500: Add ApSleep state to suspend Rickard Andersson
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=1363969212-14864-5-git-send-email-rickard.andersson@stericsson.com \
--to=rickard.andersson@stericsson.com \
--cc=daniel.lezcano@linaro.org \
--cc=hongbo.zhang@linaro.org \
--cc=khilman@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).