Update v4l2-compliance to account for ancillary links, since there are a couple of places in it that explicitly assume only two types of links exist. Signed-off-by: Daniel Scally <djrscally@xxxxxxxxx> --- utils/v4l2-compliance/v4l2-test-media.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/v4l2-compliance/v4l2-test-media.cpp b/utils/v4l2-compliance/v4l2-test-media.cpp index 28af0d83..85b1eab5 100644 --- a/utils/v4l2-compliance/v4l2-test-media.cpp +++ b/utils/v4l2-compliance/v4l2-test-media.cpp @@ -261,7 +261,8 @@ int testMediaTopology(struct node *node) for (unsigned i = 0; i < topology.num_links; i++) { media_v2_link &link = v2_links[i]; - bool is_iface = link.flags & MEDIA_LNK_FL_LINK_TYPE; + bool is_iface = (link.flags & MEDIA_LNK_FL_LINK_TYPE) == + MEDIA_LNK_FL_INTERFACE_LINK ? true : false; fail_on_test(check_0(link.reserved, sizeof(link.reserved))); fail_on_test(!link.id); @@ -460,7 +461,8 @@ int testMediaEnum(struct node *node) link_disabled = links.links[i]; // This ioctl only returns data links - fail_on_test(fl & MEDIA_LNK_FL_LINK_TYPE); + fail_on_test((fl & MEDIA_LNK_FL_LINK_TYPE) != + MEDIA_LNK_FL_DATA_LINK); fail_on_test(links.links[i].sink.entity == links.links[i].source.entity); if (is_sink) { fail_on_test(links.links[i].sink.index >= ent.pads); -- 2.25.1