of: Add self test for of_match_node()
authorGrant Likely <grant.likely@linaro.org>
Tue, 18 Feb 2014 21:38:55 +0000 (21:38 +0000)
committerGrant Likely <grant.likely@linaro.org>
Thu, 20 Feb 2014 11:52:09 +0000 (11:52 +0000)
commit1f42e5dd5065963979bb53daadf5d4f1e71f0c5f
tree8a816a351c009f02389740e4a1db1aa05570b376
parentb5190516b282bee6f10569c3387d16f83447d280
of: Add self test for of_match_node()

Adds a selftest function for the of_match_node function. of_match_node
is supposed to handle precedence for the compatible property as well as
the name and device_type values. This patch adds some test case data and
a function that makes sure each test node matches against the correct
entry of an of_device_id table.

This code was written to verify the new of_match_node() implementation
that is an earlier part of this series.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Kevin Hao <haokexin@gmail.com>
drivers/of/selftest.c
drivers/of/testcase-data/testcases.dtsi
drivers/of/testcase-data/tests-match.dtsi [new file with mode: 0644]