Re: [PATCH 1/2] core: improve of_match_ptr with OF_PLATDATA

2020-09-05 Thread Simon Glass
On Wed, 29 Jul 2020 at 10:17, Walter Lozano  wrote:
>
> Currently of_match_ptr is used to avoid referencing compatible strings
> when OF_CONTROL is not enabled. This behaviour could be improved by
> taking into account also OF_PLATDATA, as when this configuration is
> enabled the compatible strings are not used at all.
>
> Signed-off-by: Walter Lozano 
> ---
>
>  include/dm/device.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass 

Applied to u-boot-dm/next, thanks!


Re: [PATCH 1/2] core: improve of_match_ptr with OF_PLATDATA

2020-08-07 Thread Simon Glass
On Wed, 29 Jul 2020 at 10:17, Walter Lozano  wrote:
>
> Currently of_match_ptr is used to avoid referencing compatible strings
> when OF_CONTROL is not enabled. This behaviour could be improved by
> taking into account also OF_PLATDATA, as when this configuration is
> enabled the compatible strings are not used at all.
>
> Signed-off-by: Walter Lozano 
> ---
>
>  include/dm/device.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass 


[PATCH 1/2] core: improve of_match_ptr with OF_PLATDATA

2020-07-29 Thread Walter Lozano
Currently of_match_ptr is used to avoid referencing compatible strings
when OF_CONTROL is not enabled. This behaviour could be improved by
taking into account also OF_PLATDATA, as when this configuration is
enabled the compatible strings are not used at all.

Signed-off-by: Walter Lozano 
---

 include/dm/device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/dm/device.h b/include/dm/device.h
index 953706cf52..ac3b6c1b8a 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -197,7 +197,7 @@ struct udevice_id {
ulong data;
 };
 
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
 #define of_match_ptr(_ptr) (_ptr)
 #else
 #define of_match_ptr(_ptr) NULL
-- 
2.20.1