aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-09-29 07:58:47 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-29 19:16:44 -0400
commitf48c767ce8951e30eb716b8ef69142d21aacbd1d (patch)
tree9c6fdc45eb5a6566abb205e20248bbb1ff936a7d /include/linux/pm_domain.h
parent263c589bae9eb404df2c1e8d49ec775bb7b288d4 (diff)
PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h
The commit 46420dd73b80 (PM / Domains: Add APIs to attach/detach a PM domain for a device) started using errno values in pm.h header file. It also failed to include the header for these, thus it caused compiler errors. Instead of including the errno header to pm.h, let's move the functions to pm_domain.h, since it's a better match. Fixes: 46420dd73b80 (PM / Domains: Add APIs to attach/detach a PM domain for a device) Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r--include/linux/pm_domain.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index ed4f4a79c528..900474317afc 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -301,4 +301,15 @@ static inline int of_genpd_add_provider_onecell(struct device_node *np,
301 return __of_genpd_add_provider(np, __of_genpd_xlate_onecell, data); 301 return __of_genpd_add_provider(np, __of_genpd_xlate_onecell, data);
302} 302}
303 303
304#ifdef CONFIG_PM
305extern int dev_pm_domain_attach(struct device *dev, bool power_on);
306extern void dev_pm_domain_detach(struct device *dev, bool power_off);
307#else
308static inline int dev_pm_domain_attach(struct device *dev, bool power_on)
309{
310 return -ENODEV;
311}
312static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {}
313#endif
314
304#endif /* _LINUX_PM_DOMAIN_H */ 315#endif /* _LINUX_PM_DOMAIN_H */