#define LOG_CATEGORY LOGC_DEVRES
-#include <common.h>
+#include <log.h>
+#include <malloc.h>
#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <dm/device.h>
+#include <dm/devres.h>
#include <dm/root.h>
#include <dm/util.h>
/** enum devres_phase - Shows where resource was allocated
*
* DEVRES_PHASE_BIND: In the bind() method
- * DEVRES_PHASE_OFDATA: In the ofdata_to_platdata() method
+ * DEVRES_PHASE_OFDATA: In the of_to_plat() method
* DEVRES_PHASE_PROBE: In the probe() method
*/
enum devres_phase {
devres_log(dev, dr, "ADD");
assert_noisy(list_empty(&dr->entry));
- if (dev->flags & DM_FLAG_PLATDATA_VALID)
+ if (dev_get_flags(dev) & DM_FLAG_PLATDATA_VALID)
dr->phase = DEVRES_PHASE_PROBE;
- else if (dev->flags & DM_FLAG_BOUND)
+ else if (dev_get_flags(dev) & DM_FLAG_BOUND)
dr->phase = DEVRES_PHASE_OFDATA;
else
dr->phase = DEVRES_PHASE_BIND;
(unsigned long)dr->size, dr->name,
devres_phase_name[dr->phase]);
- list_for_each_entry(child, &dev->child_head, sibling_node)
+ device_foreach_child(child, dev)
dump_resources(child, depth + 1);
}