]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
of/unittest: Swap arguments of of_unittest_apply_overlay()
authorAlexander Sverdlin <alexander.sverdlin@nokia.com>
Thu, 19 Jan 2017 10:06:16 +0000 (11:06 +0100)
committerRob Herring <robh@kernel.org>
Mon, 23 Jan 2017 20:58:03 +0000 (14:58 -0600)
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>
drivers/of/unittest.c

index b4e823615f2c8f1fed463aa23a90e7e4b560fbfc..62db55b97c10bb5f511bd83d9ab4850d3d4db381 100644 (file)
@@ -1180,7 +1180,7 @@ static void of_unittest_destroy_tracked_overlays(void)
        } while (defers > 0);
 }
 
-static int of_unittest_apply_overlay(int unittest_nr, int overlay_nr,
+static int of_unittest_apply_overlay(int overlay_nr, int unittest_nr,
                int *overlay_id)
 {
        struct device_node *np = NULL;
@@ -1839,7 +1839,7 @@ static void of_unittest_overlay_i2c_15(void)
        int ret;
 
        /* device should enable */
-       ret = of_unittest_apply_overlay_check(16, 15, 0, 1, I2C_OVERLAY);
+       ret = of_unittest_apply_overlay_check(15, 15, 0, 1, I2C_OVERLAY);
        if (ret != 0)
                return;