From c5ef2025579e91f132cd3cead8ebe8b4cd5dd2b6 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 7 May 2022 22:39:01 +0200 Subject: dm: fix DM_EVENT dependencies CONFIG_DM_EVENT without CONFIG_EVENT is non-functional. Let CONFIG_DM_EVENT depend on CONFIG_EVENT. Remove superfluous stub in include/event.h. Fixes: 5b896ed5856f ("event: Add events for device probe/remove") Reported-by: Jan Kiszka Signed-off-by: Heinrich Schuchardt --- drivers/core/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/core') diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index 27d6578772a..9b9a7148a1a 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -89,8 +89,7 @@ config DM_DEVICE_REMOVE config DM_EVENT bool "Support events with driver model" - depends on DM - imply EVENT + depends on DM && EVENT default y if SANDBOX help This enables support for generating events related to driver model -- cgit v1.2.3 From bc8e09811e248287d1964ec6bba60c56235a23f2 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Tue, 17 May 2022 14:37:05 +0200 Subject: dm: core: convert of_machine_is_compatible to livetree 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 Reviewed-by: Patrice Chotard --- drivers/core/device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/core') diff --git a/drivers/core/device.c b/drivers/core/device.c index 3ab2583df38..3199d6a1b73 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -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) -- cgit v1.2.3