of: unittest: unflatten device tree on UML when testing

UML supports enabling OF, and is useful for running the device tree
tests, so add support for unflattening device tree blobs so we can
actually use it.

Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Brendan Higgins 2019-02-19 15:54:22 -08:00 committed by Rob Herring
parent da36822dec
commit 935665c1a1

View File

@ -2521,6 +2521,10 @@ static int __init of_unittest(void)
int res;
/* adding data for unittest */
if (IS_ENABLED(CONFIG_UML))
unittest_unflatten_overlay_base();
res = unittest_data_add();
if (res)
return res;