* [PATCH] dm: core: convert of_machine_is_compatible to livetree
@ 2022-05-17 12:37 Patrick Delaunay
2022-05-23 6:42 ` [Uboot-stm32] " Patrice CHOTARD
2022-06-07 16:47 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2022-05-17 12:37 UTC (permalink / raw)
To: u-boot; +Cc: Patrick Delaunay, Simon Glass, U-Boot STM32
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>
---
drivers/core/device.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 3ab2583df3..3199d6a1b7 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)
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Uboot-stm32] [PATCH] dm: core: convert of_machine_is_compatible to livetree
2022-05-17 12:37 [PATCH] dm: core: convert of_machine_is_compatible to livetree Patrick Delaunay
@ 2022-05-23 6:42 ` Patrice CHOTARD
2022-06-07 16:47 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2022-05-23 6:42 UTC (permalink / raw)
To: Patrick Delaunay, u-boot; +Cc: U-Boot STM32, Simon Glass
HI Patrick
On 5/17/22 14:37, Patrick Delaunay wrote:
> 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>
> ---
>
> drivers/core/device.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/core/device.c b/drivers/core/device.c
> index 3ab2583df3..3199d6a1b7 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)
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Thanks
Patrice
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dm: core: convert of_machine_is_compatible to livetree
2022-05-17 12:37 [PATCH] dm: core: convert of_machine_is_compatible to livetree Patrick Delaunay
2022-05-23 6:42 ` [Uboot-stm32] " Patrice CHOTARD
@ 2022-06-07 16:47 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-06-07 16:47 UTC (permalink / raw)
To: Patrick Delaunay; +Cc: u-boot, Simon Glass, U-Boot STM32
[-- Attachment #1: Type: text/plain, Size: 407 bytes --]
On Tue, May 17, 2022 at 02:37:05PM +0200, Patrick Delaunay wrote:
> 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>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-07 16:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 12:37 [PATCH] dm: core: convert of_machine_is_compatible to livetree Patrick Delaunay
2022-05-23 6:42 ` [Uboot-stm32] " Patrice CHOTARD
2022-06-07 16:47 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.