mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
test: create dedicated fdt node for ofnode_for_each_prop test
Property count may change in /buttons node, if more button tests added, and this will break ofnode_for_each_prop. Add separate node for mentioned test. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Tom Rini
parent
2ea062265f
commit
298ffdd5d6
@@ -1537,6 +1537,20 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ofnode-foreach {
|
||||||
|
compatible = "foreach";
|
||||||
|
|
||||||
|
first {
|
||||||
|
prop1 = <1>;
|
||||||
|
prop2 = <2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
second {
|
||||||
|
prop1 = <1>;
|
||||||
|
prop2 = <2>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
osd {
|
osd {
|
||||||
compatible = "sandbox,sandbox_osd";
|
compatible = "sandbox,sandbox_osd";
|
||||||
};
|
};
|
||||||
|
@@ -1046,7 +1046,7 @@ static int dm_test_ofnode_for_each_prop(struct unit_test_state *uts)
|
|||||||
struct ofprop prop;
|
struct ofprop prop;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
node = ofnode_path("/buttons");
|
node = ofnode_path("/ofnode-foreach");
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
/* we expect "compatible" for each node */
|
/* we expect "compatible" for each node */
|
||||||
|
Reference in New Issue
Block a user