]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/core/simple-bus.c
dm: core: Replace of_offset with accessor
[people/ms/u-boot.git] / drivers / core / simple-bus.c
index 1a9c864ef377e65334f0cf50a1e83e49be8675a2..6be269f273599cde53a085a0a0759b1cb787c08b 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <common.h>
 #include <dm.h>
-#include <dm/root.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -31,7 +30,7 @@ static int simple_bus_post_bind(struct udevice *dev)
        u32 cell[3];
        int ret;
 
-       ret = fdtdec_get_int_array(gd->fdt_blob, dev->of_offset, "ranges",
+       ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(dev), "ranges",
                                   cell, ARRAY_SIZE(cell));
        if (!ret) {
                struct simple_bus_plat *plat = dev_get_uclass_platdata(dev);
@@ -41,7 +40,7 @@ static int simple_bus_post_bind(struct udevice *dev)
                plat->size = cell[2];
        }
 
-       return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
+       return dm_scan_fdt_dev(dev);
 }
 
 UCLASS_DRIVER(simple_bus) = {