#include <linux/suspend.h>
#include "base.h"
-#include "power/power.h"
MODULE_AUTHOR("Manuel Estrada Sainz");
MODULE_DESCRIPTION("Multi purpose firmware loading support");
return (fwn->magic == (unsigned long)match_data);
}
-static void dev_cache_fw_image(struct device *dev)
+static void dev_cache_fw_image(struct device *dev, void *data)
{
LIST_HEAD(todo);
struct fw_cache_entry *fce;
static void device_cache_fw_images(void)
{
struct firmware_cache *fwc = &fw_cache;
- struct device *dev;
int old_timeout;
DEFINE_WAIT(wait);
old_timeout = loading_timeout;
loading_timeout = 10;
- device_pm_lock();
- list_for_each_entry(dev, &dpm_list, power.entry)
- dev_cache_fw_image(dev);
- device_pm_unlock();
+ dpm_for_each_dev(NULL, dev_cache_fw_image);
/* wait for completion of caching firmware for all devices */
spin_lock(&fwc->name_lock);