]> Git Repo - u-boot.git/blobdiff - drivers/core/devres.c
Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"
[u-boot.git] / drivers / core / devres.c
index 237b42653c6beb51e6cdc8043a8ec0941b925f6b..8df08b91021c3758a9d37216f426a21e9592c9a9 100644 (file)
@@ -9,18 +9,20 @@
 
 #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 {
@@ -104,9 +106,9 @@ void devres_add(struct udevice *dev, void *res)
 
        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;
@@ -229,7 +231,7 @@ static void dump_resources(struct udevice *dev, int depth)
                       (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);
 }
 
This page took 0.023993 seconds and 4 git commands to generate.