]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 29 Sep 2014 11:58:47 +0000 (13:58 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Sep 2014 23:16:44 +0000 (01:16 +0200)
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>
drivers/amba/bus.c
drivers/base/platform.c
drivers/i2c/i2c-core.c
drivers/mmc/core/sdio_bus.c
drivers/spi/spi.c
include/linux/pm.h
include/linux/pm_domain.h

index 8f5239377f91bca70e1fccf876369bdfc8db1a03..47bbdc1b5be327ddf913f920d8b78cfc4f253a0c 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/pm.h>
 #include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
 #include <linux/amba/bus.h>
 #include <linux/sizes.h>
 
index 904be3dc0908cabb88780e7c8ed00766c3ad54e8..b2afc29403f9e887554d441a0c36629ccb49bce6 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
 #include <linux/idr.h>
 #include <linux/acpi.h>
 #include <linux/clk/clk-conf.h>
index 3cd8f11f1b5ff6ebc25ac12a7267c52b54f506f5..e61a6c5c33725ec086993faada607766ad9d9258 100644 (file)
@@ -48,6 +48,7 @@
 #include <linux/irqflags.h>
 #include <linux/rwsem.h>
 #include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
 #include <linux/acpi.h>
 #include <linux/jump_label.h>
 #include <asm/uaccess.h>
index 1df0fc63c17c878921ae4504286ec60edfa69b5b..65cf7a7e05eaf23ef73bf7ea8889b35c0f367597 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/export.h>
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
 #include <linux/acpi.h>
 
 #include <linux/mmc/card.h>
index 72a0beb1fafa144c799003ab058e43d2060151b2..3907f1493e7dcb6903120c9d24aee7a914dfddf8 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/spi/spi.h>
 #include <linux/of_gpio.h>
 #include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
 #include <linux/export.h>
 #include <linux/sched/rt.h>
 #include <linux/delay.h>
index c4cbf485a5d6abc588ccc7b90170f76910c69b1d..1022ba1eb4de9ccf2127a9f7f5c424f3d32f6c90 100644 (file)
@@ -622,17 +622,6 @@ struct dev_pm_domain {
        void (*detach)(struct device *dev, bool power_off);
 };
 
-#ifdef CONFIG_PM
-extern int dev_pm_domain_attach(struct device *dev, bool power_on);
-extern void dev_pm_domain_detach(struct device *dev, bool power_off);
-#else
-static inline int dev_pm_domain_attach(struct device *dev, bool power_on)
-{
-       return -ENODEV;
-}
-static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {}
-#endif
-
 /*
  * The PM_EVENT_ messages are also used by drivers implementing the legacy
  * suspend framework, based on the ->suspend() and ->resume() callbacks common
index ed4f4a79c52836180a13008bc0b34dd27333483c..900474317afc155110727f0fe02f7f8b2151784e 100644 (file)
@@ -301,4 +301,15 @@ static inline int of_genpd_add_provider_onecell(struct device_node *np,
        return __of_genpd_add_provider(np, __of_genpd_xlate_onecell, data);
 }
 
+#ifdef CONFIG_PM
+extern int dev_pm_domain_attach(struct device *dev, bool power_on);
+extern void dev_pm_domain_detach(struct device *dev, bool power_off);
+#else
+static inline int dev_pm_domain_attach(struct device *dev, bool power_on)
+{
+       return -ENODEV;
+}
+static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {}
+#endif
+
 #endif /* _LINUX_PM_DOMAIN_H */