@@ -1455,17 +1455,18 @@ static int __maybe_unused vi_runtime_suspend(struct device *dev)
1455
1455
}
1456
1456
1457
1457
/*
1458
- * Graph Management
1458
+ * Find the entity matching a given fwnode in an v4l2_async_notifier list
1459
1459
*/
1460
1460
static struct tegra_vi_graph_entity *
1461
- tegra_vi_graph_find_entity (struct tegra_vi_channel * chan ,
1461
+ tegra_vi_graph_find_entity (struct list_head * list ,
1462
1462
const struct fwnode_handle * fwnode )
1463
1463
{
1464
1464
struct tegra_vi_graph_entity * entity ;
1465
1465
struct v4l2_async_connection * asd ;
1466
1466
1467
- list_for_each_entry (asd , & chan -> notifier . done_list , asc_entry ) {
1467
+ list_for_each_entry (asd , list , asc_entry ) {
1468
1468
entity = to_tegra_vi_graph_entity (asd );
1469
+
1469
1470
if (entity -> asd .match .fwnode == fwnode )
1470
1471
return entity ;
1471
1472
}
@@ -1532,7 +1533,8 @@ static int tegra_vi_graph_build(struct tegra_vi_channel *chan,
1532
1533
}
1533
1534
1534
1535
/* find the remote entity from notifier list */
1535
- ent = tegra_vi_graph_find_entity (chan , link .remote_node );
1536
+ ent = tegra_vi_graph_find_entity (& chan -> notifier .done_list ,
1537
+ link .remote_node );
1536
1538
if (!ent ) {
1537
1539
dev_err (vi -> dev , "no entity found for %pOF\n" ,
1538
1540
to_of_node (link .remote_node ));
@@ -1664,7 +1666,8 @@ static int tegra_vi_graph_notify_bound(struct v4l2_async_notifier *notifier,
1664
1666
* Locate the entity corresponding to the bound subdev and store the
1665
1667
* subdev pointer.
1666
1668
*/
1667
- entity = tegra_vi_graph_find_entity (chan , subdev -> fwnode );
1669
+ entity = tegra_vi_graph_find_entity (& chan -> notifier .waiting_list ,
1670
+ subdev -> fwnode );
1668
1671
if (!entity ) {
1669
1672
dev_err (vi -> dev , "no entity for subdev %s\n" , subdev -> name );
1670
1673
return - EINVAL ;
@@ -1713,7 +1716,8 @@ static int tegra_vi_graph_parse_one(struct tegra_vi_channel *chan,
1713
1716
1714
1717
/* skip entities that are already processed */
1715
1718
if (device_match_fwnode (vi -> dev , remote ) ||
1716
- tegra_vi_graph_find_entity (chan , remote )) {
1719
+ tegra_vi_graph_find_entity (& chan -> notifier .waiting_list ,
1720
+ remote )) {
1717
1721
fwnode_handle_put (remote );
1718
1722
continue ;
1719
1723
}
0 commit comments