]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: core: convert of_machine_is_compatible to livetree
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Tue, 17 May 2022 12:37:05 +0000 (14:37 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 6 Jun 2022 22:01:21 +0000 (18:01 -0400)
Replace in the function of_machine_is_compatible(), the used API
fdt_node_check_compatible() by ofnode_device_is_compatible()
to support a live tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
drivers/core/device.c

index 3ab2583df3885cf99a9c2255037339a774491852..3199d6a1b73ba47c964671b18a701e1c3059fd12 100644 (file)
@@ -1125,9 +1125,7 @@ bool device_is_compatible(const struct udevice *dev, const char *compat)
 
 bool of_machine_is_compatible(const char *compat)
 {
-       const void *fdt = gd->fdt_blob;
-
-       return !fdt_node_check_compatible(fdt, 0, compat);
+       return ofnode_device_is_compatible(ofnode_root(), compat);
 }
 
 int dev_disable_by_path(const char *path)