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:
committed by
Simon Glass
parent
2b522f1e79
commit
dc447b6b3f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user