PM / Sleep: introduce dpm_for_each_dev
authorMing Lei <ming.lei@canonical.com>
Fri, 17 Aug 2012 14:06:59 +0000 (22:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Aug 2012 14:37:35 +0000 (07:37 -0700)
commitdfe3212e0196c01402154971841463d721dea915
tree0cb18c625b9d1b50999f8942e94be0689e1396a6
parentc08f67730aba342b03f070209acc2990d3decf3c
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>
drivers/base/power/main.c
include/linux/pm.h