diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2016-04-08 07:40:53 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-21 19:32:37 -0400 |
commit | 372a12ed9d99c02f105278a9b75f0cb176d15cc1 (patch) | |
tree | 196d377f99169848670dccc2ce50462a6ea4587c | |
parent | 0ae3aeefabbeef26294e7a349b51f1c761d46c9f (diff) |
PM / Runtime: Move ignore_children flag under CONFIG_PM
The ignore_children flag is used only when CONFIG_PM is set, so let's move
it into that section within the struct dev_pm_info.
Move also the corresponding pm_suspend_ignore_children() API out of
device.h into pm_runtime.h, to be consistent with similar APIs.
Unfortunate this causes the Toshiba PCI SD mmc host driver to fail to
compile as it needs pm_runtime.h, so let's fix this here as well.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/mmc/host/toshsd.c | 1 | ||||
-rw-r--r-- | include/linux/device.h | 5 | ||||
-rw-r--r-- | include/linux/pm.h | 2 | ||||
-rw-r--r-- | include/linux/pm_runtime.h | 6 |
4 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mmc/host/toshsd.c b/drivers/mmc/host/toshsd.c index e2cdd5fb1423..553ef41bb806 100644 --- a/drivers/mmc/host/toshsd.c +++ b/drivers/mmc/host/toshsd.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/pm_runtime.h> | ||
24 | #include <linux/mmc/host.h> | 25 | #include <linux/mmc/host.h> |
25 | #include <linux/mmc/mmc.h> | 26 | #include <linux/mmc/mmc.h> |
26 | 27 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index 002c59728dbe..b130304f9b1b 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -956,11 +956,6 @@ static inline bool device_async_suspend_enabled(struct device *dev) | |||
956 | return !!dev->power.async_suspend; | 956 | return !!dev->power.async_suspend; |
957 | } | 957 | } |
958 | 958 | ||
959 | static inline void pm_suspend_ignore_children(struct device *dev, bool enable) | ||
960 | { | ||
961 | dev->power.ignore_children = enable; | ||
962 | } | ||
963 | |||
964 | static inline void dev_pm_syscore_device(struct device *dev, bool val) | 959 | static inline void dev_pm_syscore_device(struct device *dev, bool val) |
965 | { | 960 | { |
966 | #ifdef CONFIG_PM_SLEEP | 961 | #ifdef CONFIG_PM_SLEEP |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 6a5d654f4447..06eb353182ab 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -563,7 +563,6 @@ struct dev_pm_info { | |||
563 | bool is_suspended:1; /* Ditto */ | 563 | bool is_suspended:1; /* Ditto */ |
564 | bool is_noirq_suspended:1; | 564 | bool is_noirq_suspended:1; |
565 | bool is_late_suspended:1; | 565 | bool is_late_suspended:1; |
566 | bool ignore_children:1; | ||
567 | bool early_init:1; /* Owned by the PM core */ | 566 | bool early_init:1; /* Owned by the PM core */ |
568 | bool direct_complete:1; /* Owned by the PM core */ | 567 | bool direct_complete:1; /* Owned by the PM core */ |
569 | spinlock_t lock; | 568 | spinlock_t lock; |
@@ -591,6 +590,7 @@ struct dev_pm_info { | |||
591 | unsigned int deferred_resume:1; | 590 | unsigned int deferred_resume:1; |
592 | unsigned int run_wake:1; | 591 | unsigned int run_wake:1; |
593 | unsigned int runtime_auto:1; | 592 | unsigned int runtime_auto:1; |
593 | bool ignore_children:1; | ||
594 | unsigned int no_callbacks:1; | 594 | unsigned int no_callbacks:1; |
595 | unsigned int irq_safe:1; | 595 | unsigned int irq_safe:1; |
596 | unsigned int use_autosuspend:1; | 596 | unsigned int use_autosuspend:1; |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 7af093d6a4dd..2e14d2667b6c 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -56,6 +56,11 @@ extern void pm_runtime_update_max_time_suspended(struct device *dev, | |||
56 | s64 delta_ns); | 56 | s64 delta_ns); |
57 | extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable); | 57 | extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable); |
58 | 58 | ||
59 | static inline void pm_suspend_ignore_children(struct device *dev, bool enable) | ||
60 | { | ||
61 | dev->power.ignore_children = enable; | ||
62 | } | ||
63 | |||
59 | static inline bool pm_children_suspended(struct device *dev) | 64 | static inline bool pm_children_suspended(struct device *dev) |
60 | { | 65 | { |
61 | return dev->power.ignore_children | 66 | return dev->power.ignore_children |
@@ -156,6 +161,7 @@ static inline void __pm_runtime_disable(struct device *dev, bool c) {} | |||
156 | static inline void pm_runtime_allow(struct device *dev) {} | 161 | static inline void pm_runtime_allow(struct device *dev) {} |
157 | static inline void pm_runtime_forbid(struct device *dev) {} | 162 | static inline void pm_runtime_forbid(struct device *dev) {} |
158 | 163 | ||
164 | static inline void pm_suspend_ignore_children(struct device *dev, bool enable) {} | ||
159 | static inline bool pm_children_suspended(struct device *dev) { return false; } | 165 | static inline bool pm_children_suspended(struct device *dev) { return false; } |
160 | static inline void pm_runtime_get_noresume(struct device *dev) {} | 166 | static inline void pm_runtime_get_noresume(struct device *dev) {} |
161 | static inline void pm_runtime_put_noidle(struct device *dev) {} | 167 | static inline void pm_runtime_put_noidle(struct device *dev) {} |