Skip to content

Commit 30c1886

Browse files
Sakari AilusHans Verkuil
authored andcommitted
media: xilinx-vipp: Look for entities also in waiting_list
The big V4L2 async framework overhaul simplified linked lists used by the V4L2 async framework. This affected a few drivers and it turns out a few of those drivers rely on searching for entities in both async notifier's waiting and done lists. Do that by separately traversing both. Fixes: 9bf19fb ("media: v4l: async: Rework internal lists") Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 4800021 commit 30c1886

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

drivers/media/platform/xilinx/xilinx-vipp.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,18 @@ xvip_graph_find_entity(struct xvip_composite_device *xdev,
5555
{
5656
struct xvip_graph_entity *entity;
5757
struct v4l2_async_connection *asd;
58-
59-
list_for_each_entry(asd, &xdev->notifier.done_list, asc_entry) {
60-
entity = to_xvip_entity(asd);
61-
if (entity->asd.match.fwnode == fwnode)
62-
return entity;
58+
struct list_head *lists[] = {
59+
&xdev->notifier.done_list,
60+
&xdev->notifier.waiting_list
61+
};
62+
unsigned int i;
63+
64+
for (i = 0; i < ARRAY_SIZE(lists); i++) {
65+
list_for_each_entry(asd, lists[i], asc_entry) {
66+
entity = to_xvip_entity(asd);
67+
if (entity->asd.match.fwnode == fwnode)
68+
return entity;
69+
}
6370
}
6471

6572
return NULL;

0 commit comments

Comments
 (0)