core: improve of_match_ptr with OF_PLATDATA

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>
This commit is contained in:
Walter Lozano 2020-07-29 13:17:31 -03:00 committed by Simon Glass
parent 2b522f1e79
commit dc447b6b3f

View 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