aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_runtime.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-01-12 04:51:13 -0500
committerThomas Gleixner <tglx@linutronix.de>2015-01-12 04:51:13 -0500
commit2f5eaf66e580f64032b365a00157b6b58c266b37 (patch)
tree7852017c864f0eb3833782e2a017952bd8531458 /include/linux/pm_runtime.h
parentc291ee622165cb2c8d4e7af63fffd499354a23be (diff)
parent91d1179212161f220938198b742c328ad38fd0a3 (diff)
Merge tag 'irqchip-urgent-3.19' of git://git.infradead.org/users/jcooper/linux into irq/urgent
irqchip urgent fixes for v3.19 from Jason Cooper - mtk-sysirq: Fix error handling - hip04: Fix cpu map for 16bit value - gic-v3-its: Clear a warning regarding decimal constants - omap-intc: Fix legacy DMA regression - atmel-aic-common: Retain priority when changing type
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r--include/linux/pm_runtime.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 367f49b9a1c9..30e84d48bfea 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -35,16 +35,6 @@ extern int pm_generic_runtime_suspend(struct device *dev);
35extern int pm_generic_runtime_resume(struct device *dev); 35extern int pm_generic_runtime_resume(struct device *dev);
36extern int pm_runtime_force_suspend(struct device *dev); 36extern int pm_runtime_force_suspend(struct device *dev);
37extern int pm_runtime_force_resume(struct device *dev); 37extern int pm_runtime_force_resume(struct device *dev);
38#else
39static inline bool queue_pm_work(struct work_struct *work) { return false; }
40
41static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
42static inline int pm_generic_runtime_resume(struct device *dev) { return 0; }
43static inline int pm_runtime_force_suspend(struct device *dev) { return 0; }
44static inline int pm_runtime_force_resume(struct device *dev) { return 0; }
45#endif
46
47#ifdef CONFIG_PM_RUNTIME
48 38
49extern int __pm_runtime_idle(struct device *dev, int rpmflags); 39extern int __pm_runtime_idle(struct device *dev, int rpmflags);
50extern int __pm_runtime_suspend(struct device *dev, int rpmflags); 40extern int __pm_runtime_suspend(struct device *dev, int rpmflags);
@@ -128,7 +118,19 @@ static inline void pm_runtime_mark_last_busy(struct device *dev)
128 ACCESS_ONCE(dev->power.last_busy) = jiffies; 118 ACCESS_ONCE(dev->power.last_busy) = jiffies;
129} 119}
130 120
131#else /* !CONFIG_PM_RUNTIME */ 121static inline bool pm_runtime_is_irq_safe(struct device *dev)
122{
123 return dev->power.irq_safe;
124}
125
126#else /* !CONFIG_PM */
127
128static inline bool queue_pm_work(struct work_struct *work) { return false; }
129
130static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
131static inline int pm_generic_runtime_resume(struct device *dev) { return 0; }
132static inline int pm_runtime_force_suspend(struct device *dev) { return 0; }
133static inline int pm_runtime_force_resume(struct device *dev) { return 0; }
132 134
133static inline int __pm_runtime_idle(struct device *dev, int rpmflags) 135static inline int __pm_runtime_idle(struct device *dev, int rpmflags)
134{ 136{
@@ -167,6 +169,7 @@ static inline bool pm_runtime_enabled(struct device *dev) { return false; }
167 169
168static inline void pm_runtime_no_callbacks(struct device *dev) {} 170static inline void pm_runtime_no_callbacks(struct device *dev) {}
169static inline void pm_runtime_irq_safe(struct device *dev) {} 171static inline void pm_runtime_irq_safe(struct device *dev) {}
172static inline bool pm_runtime_is_irq_safe(struct device *dev) { return false; }
170 173
171static inline bool pm_runtime_callbacks_present(struct device *dev) { return false; } 174static inline bool pm_runtime_callbacks_present(struct device *dev) { return false; }
172static inline void pm_runtime_mark_last_busy(struct device *dev) {} 175static inline void pm_runtime_mark_last_busy(struct device *dev) {}
@@ -179,7 +182,7 @@ static inline unsigned long pm_runtime_autosuspend_expiration(
179static inline void pm_runtime_set_memalloc_noio(struct device *dev, 182static inline void pm_runtime_set_memalloc_noio(struct device *dev,
180 bool enable){} 183 bool enable){}
181 184
182#endif /* !CONFIG_PM_RUNTIME */ 185#endif /* !CONFIG_PM */
183 186
184static inline int pm_runtime_idle(struct device *dev) 187static inline int pm_runtime_idle(struct device *dev)
185{ 188{