diff options
author | Ming Lei <ming.lei@canonical.com> | 2012-08-17 10:07:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-17 10:37:35 -0400 |
commit | ab6dd8e5ecf8c1a38ee1b9b9dfa9ab129dc3e200 (patch) | |
tree | 2a2fd2175ccc3caf8d0bea7f6101e64765bdbe24 /drivers/base/firmware_class.c | |
parent | dfe3212e0196c01402154971841463d721dea915 (diff) |
firmware loader: fix build failure if FW_LOADER is m
device_cache_fw_images need to iterate devices in system,
so this patch applies the introduced dpm_for_each_dev to
avoid link failure if CONFIG_FW_LOADER is m.
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 'drivers/base/firmware_class.c')
-rw-r--r-- | drivers/base/firmware_class.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 4c8d8efecdf4..ed0510a912c8 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/suspend.h> | 27 | #include <linux/suspend.h> |
28 | 28 | ||
29 | #include "base.h" | 29 | #include "base.h" |
30 | #include "power/power.h" | ||
31 | 30 | ||
32 | MODULE_AUTHOR("Manuel Estrada Sainz"); | 31 | MODULE_AUTHOR("Manuel Estrada Sainz"); |
33 | MODULE_DESCRIPTION("Multi purpose firmware loading support"); | 32 | MODULE_DESCRIPTION("Multi purpose firmware loading support"); |
@@ -1093,7 +1092,7 @@ static int devm_name_match(struct device *dev, void *res, | |||
1093 | return (fwn->magic == (unsigned long)match_data); | 1092 | return (fwn->magic == (unsigned long)match_data); |
1094 | } | 1093 | } |
1095 | 1094 | ||
1096 | static void dev_cache_fw_image(struct device *dev) | 1095 | static void dev_cache_fw_image(struct device *dev, void *data) |
1097 | { | 1096 | { |
1098 | LIST_HEAD(todo); | 1097 | LIST_HEAD(todo); |
1099 | struct fw_cache_entry *fce; | 1098 | struct fw_cache_entry *fce; |
@@ -1148,7 +1147,6 @@ static void __device_uncache_fw_images(void) | |||
1148 | static void device_cache_fw_images(void) | 1147 | static void device_cache_fw_images(void) |
1149 | { | 1148 | { |
1150 | struct firmware_cache *fwc = &fw_cache; | 1149 | struct firmware_cache *fwc = &fw_cache; |
1151 | struct device *dev; | ||
1152 | int old_timeout; | 1150 | int old_timeout; |
1153 | DEFINE_WAIT(wait); | 1151 | DEFINE_WAIT(wait); |
1154 | 1152 | ||
@@ -1165,10 +1163,7 @@ static void device_cache_fw_images(void) | |||
1165 | old_timeout = loading_timeout; | 1163 | old_timeout = loading_timeout; |
1166 | loading_timeout = 10; | 1164 | loading_timeout = 10; |
1167 | 1165 | ||
1168 | device_pm_lock(); | 1166 | dpm_for_each_dev(NULL, dev_cache_fw_image); |
1169 | list_for_each_entry(dev, &dpm_list, power.entry) | ||
1170 | dev_cache_fw_image(dev); | ||
1171 | device_pm_unlock(); | ||
1172 | 1167 | ||
1173 | /* wait for completion of caching firmware for all devices */ | 1168 | /* wait for completion of caching firmware for all devices */ |
1174 | spin_lock(&fwc->name_lock); | 1169 | spin_lock(&fwc->name_lock); |