]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
core: improve of_match_ptr with OF_PLATDATA
authorWalter Lozano <walter.lozano@collabora.com>
Wed, 29 Jul 2020 16:17:31 +0000 (13:17 -0300)
committerSimon Glass <sjg@chromium.org>
Tue, 22 Sep 2020 18:50:43 +0000 (12:50 -0600)
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 <walter.lozano@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/dm/device.h

index 953706cf5256fb5e41d0862f9978f326044b11e3..ac3b6c1b8a0da8df9262e38d2321b04e00005a31 100644 (file)
@@ -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