]> 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 913c3ccc70b6a06c22f6e25b4a58eff3874efeaf..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) = {
@@ -53,6 +52,7 @@ UCLASS_DRIVER(simple_bus) = {
 
 static const struct udevice_id generic_simple_bus_ids[] = {
        { .compatible = "simple-bus" },
+       { .compatible = "simple-mfd" },
        { }
 };