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 <[email protected]>
Reviewed-by: Frank Rowand <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
This commit is contained in:
Brendan Higgins 2019-02-19 15:54:22 -08:00 • committed by Rob Herring
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;