diff options
author | Alexander Sverdlin <alexander.sverdlin@nokia.com> | 2017-01-19 05:06:16 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2017-01-23 15:58:03 -0500 |
commit | ca7b89647b76a2f5c26f0927bb72fdaf854d6592 (patch) | |
tree | 590a0889cf74a91d75da56417aa8f8fd664b6d88 /drivers/of/unittest.c | |
parent | a51741ebe1315c88488ed35f942e95f427ea2d31 (diff) |
of/unittest: Swap arguments of of_unittest_apply_overlay()
Function signature
of_unittest_apply_overlay(int unittest_nr, int overlay_nr, ...
and call sites, like in of_unittest_apply_overlay_check():
ret = of_unittest_apply_overlay(overlay_nr, unittest_nr, ...
do not match. Fix this in one place (function signature).
The only affected test case is 15, which supplies non-existing
overlay number 16, but two bugs matched here. Fix the test case.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest.c')
-rw-r--r-- | drivers/of/unittest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index b4e823615f2c..62db55b97c10 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c | |||
@@ -1180,7 +1180,7 @@ static void of_unittest_destroy_tracked_overlays(void) | |||
1180 | } while (defers > 0); | 1180 | } while (defers > 0); |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | static int of_unittest_apply_overlay(int unittest_nr, int overlay_nr, | 1183 | static int of_unittest_apply_overlay(int overlay_nr, int unittest_nr, |
1184 | int *overlay_id) | 1184 | int *overlay_id) |
1185 | { | 1185 | { |
1186 | struct device_node *np = NULL; | 1186 | struct device_node *np = NULL; |
@@ -1839,7 +1839,7 @@ static void of_unittest_overlay_i2c_15(void) | |||
1839 | int ret; | 1839 | int ret; |
1840 | 1840 | ||
1841 | /* device should enable */ | 1841 | /* device should enable */ |
1842 | ret = of_unittest_apply_overlay_check(16, 15, 0, 1, I2C_OVERLAY); | 1842 | ret = of_unittest_apply_overlay_check(15, 15, 0, 1, I2C_OVERLAY); |
1843 | if (ret != 0) | 1843 | if (ret != 0) |
1844 | return; | 1844 | return; |
1845 | 1845 | ||