summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorBrendan Higgins <brendanhiggins@google.com>2019-02-20 02:54:22 +0300
committerRob Herring <robh@kernel.org>2019-02-28 20:50:10 +0300
commit935665c1a117f34662549f01e1c9bc5ea7132556 (patch)
tree36f9715b8e1fc7c5e6d7e8ed3dea9d76b4a2af28 /drivers/of
parentda36822dec7436bc270d3e24edc89c4ceb708bb8 (diff)
downloadlinux-935665c1a117f34662549f01e1c9bc5ea7132556.tar.xz
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>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/unittest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 872956500c27..66037511f2d7 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -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;