Skip to content

Commit

Permalink
of: unittest: use of_platform_default_populate() to populate default bus
Browse files Browse the repository at this point in the history
Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
  • Loading branch information
Kefeng Wang authored and Rob Herring committed Jun 23, 2016
1 parent 9f2c519 commit 146dedb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/of/unittest.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ static void __init of_unittest_platform_populate(void)
};

np = of_find_node_by_path("/testcase-data");
of_platform_populate(np, of_default_bus_match_table, NULL, NULL);
of_platform_default_populate(np, NULL, NULL);

/* Test that a missing irq domain returns -EPROBE_DEFER */
np = of_find_node_by_path("/testcase-data/testcase-device1");
Expand Down Expand Up @@ -1871,8 +1871,7 @@ static void __init of_unittest_overlay(void)
goto out;
}

ret = of_platform_populate(bus_np, of_default_bus_match_table,
NULL, NULL);
ret = of_platform_default_populate(bus_np, NULL, NULL);
if (ret != 0) {
unittest(0, "could not populate bus @ \"%s\"\n", bus_path);
goto out;
Expand Down

0 comments on commit 146dedb

Please sign in to comment.