aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-08-17 10:06:59 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-17 10:37:35 -0400
commitdfe3212e0196c01402154971841463d721dea915 (patch)
tree0cb18c625b9d1b50999f8942e94be0689e1396a6 /include/linux/pm.h
parentc08f67730aba342b03f070209acc2990d3decf3c (diff)
PM / Sleep: introduce dpm_for_each_dev
dpm_list and its pm lock provide a good way to iterate all devices in system. Except this way, there is no other easy way to iterate devices in system. firmware loader need to cache firmware images for devices before system sleep, so introduce the function to meet its demand. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r--include/linux/pm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index f067e60a3832..88f034a23f2c 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -638,6 +638,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
638 } while (0) 638 } while (0)
639 639
640extern int device_pm_wait_for_dev(struct device *sub, struct device *dev); 640extern int device_pm_wait_for_dev(struct device *sub, struct device *dev);
641extern void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *));
641 642
642extern int pm_generic_prepare(struct device *dev); 643extern int pm_generic_prepare(struct device *dev);
643extern int pm_generic_suspend_late(struct device *dev); 644extern int pm_generic_suspend_late(struct device *dev);
@@ -677,6 +678,10 @@ static inline int device_pm_wait_for_dev(struct device *a, struct device *b)
677 return 0; 678 return 0;
678} 679}
679 680
681static inline void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *))
682{
683}
684
680#define pm_generic_prepare NULL 685#define pm_generic_prepare NULL
681#define pm_generic_suspend NULL 686#define pm_generic_suspend NULL
682#define pm_generic_resume NULL 687#define pm_generic_resume NULL