aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-01-27 17:47:38 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2010-02-26 14:39:11 -0500
commitf8824cee405c62ba465b85365201166d9cf86a14 (patch)
tree90020be3264ff98bad2f14759127a2d9693673d8 /include/linux/pm.h
parent97df8c12995c5bac73e3bfeea4c5be155c1f4401 (diff)
PM: Allow device drivers to use dpm_wait()
There are some dependencies between devices (in particular, between EHCI USB controllers and their OHCI/UHCI siblings) which are not reflected by the structure of the device tree. With synchronous suspend and resume these dependencies are taken into accout automatically, because the devices in question are always registered in the right order, but to meet these constraints with asynchronous suspend and resume the drivers of these devices will need to use dpm_wait() in their suspend/resume routines, so introduce a helper function allowing them to do that. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r--include/linux/pm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 9c16cd20fc96..e80df06ad22a 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -512,6 +512,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
512 __suspend_report_result(__func__, fn, ret); \ 512 __suspend_report_result(__func__, fn, ret); \
513 } while (0) 513 } while (0)
514 514
515extern void device_pm_wait_for_dev(struct device *sub, struct device *dev);
515#else /* !CONFIG_PM_SLEEP */ 516#else /* !CONFIG_PM_SLEEP */
516 517
517#define device_pm_lock() do {} while (0) 518#define device_pm_lock() do {} while (0)
@@ -524,6 +525,7 @@ static inline int dpm_suspend_start(pm_message_t state)
524 525
525#define suspend_report_result(fn, ret) do {} while (0) 526#define suspend_report_result(fn, ret) do {} while (0)
526 527
528static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {}
527#endif /* !CONFIG_PM_SLEEP */ 529#endif /* !CONFIG_PM_SLEEP */
528 530
529/* How to reorder dpm_list after device_move() */ 531/* How to reorder dpm_list after device_move() */