File tree Expand file tree Collapse file tree 3 files changed +8
-45
lines changed
staging/media/tegra-video Expand file tree Collapse file tree 3 files changed +8
-45
lines changed Original file line number Diff line number Diff line change @@ -1011,44 +1011,6 @@ fwnode_graph_get_remote_endpoint(const struct fwnode_handle *fwnode)
10111011}
10121012EXPORT_SYMBOL_GPL (fwnode_graph_get_remote_endpoint );
10131013
1014- /**
1015- * fwnode_graph_get_remote_node - get remote parent node for given port/endpoint
1016- * @fwnode: pointer to parent fwnode_handle containing graph port/endpoint
1017- * @port_id: identifier of the parent port node
1018- * @endpoint_id: identifier of the endpoint node
1019- *
1020- * Return: Remote fwnode handle associated with remote endpoint node linked
1021- * to @node. Use fwnode_node_put() on it when done.
1022- */
1023- struct fwnode_handle *
1024- fwnode_graph_get_remote_node (const struct fwnode_handle * fwnode , u32 port_id ,
1025- u32 endpoint_id )
1026- {
1027- struct fwnode_handle * endpoint ;
1028-
1029- fwnode_graph_for_each_endpoint (fwnode , endpoint ) {
1030- struct fwnode_endpoint fwnode_ep ;
1031- struct fwnode_handle * remote ;
1032- int ret ;
1033-
1034- ret = fwnode_graph_parse_endpoint (endpoint , & fwnode_ep );
1035- if (ret < 0 )
1036- continue ;
1037-
1038- if (fwnode_ep .port != port_id || fwnode_ep .id != endpoint_id )
1039- continue ;
1040-
1041- remote = fwnode_graph_get_remote_port_parent (endpoint );
1042- if (!remote )
1043- return NULL ;
1044-
1045- return fwnode_device_is_available (remote ) ? remote : NULL ;
1046- }
1047-
1048- return NULL ;
1049- }
1050- EXPORT_SYMBOL_GPL (fwnode_graph_get_remote_node );
1051-
10521014static bool fwnode_graph_remote_available (struct fwnode_handle * ep )
10531015{
10541016 struct fwnode_handle * dev_node ;
Original file line number Diff line number Diff line change @@ -1845,7 +1845,6 @@ static int tegra_vi_graph_init(struct tegra_vi *vi)
18451845 struct tegra_vi_channel * chan ;
18461846 struct fwnode_handle * fwnode = dev_fwnode (vi -> dev );
18471847 int ret ;
1848- struct fwnode_handle * remote = NULL ;
18491848
18501849 /*
18511850 * Walk the links to parse the full graph. Each channel will have
@@ -1857,11 +1856,16 @@ static int tegra_vi_graph_init(struct tegra_vi *vi)
18571856 * next channels.
18581857 */
18591858 list_for_each_entry (chan , & vi -> vi_chans , list ) {
1860- remote = fwnode_graph_get_remote_node (fwnode , chan -> portnos [0 ],
1861- 0 );
1862- if (!remote )
1859+ struct fwnode_handle * ep , * remote ;
1860+
1861+ ep = fwnode_graph_get_endpoint_by_id (fwnode ,
1862+ chan -> portnos [0 ], 0 , 0 );
1863+ if (!ep )
18631864 continue ;
18641865
1866+ remote = fwnode_graph_get_remote_port_parent (ep );
1867+ fwnode_handle_put (ep );
1868+
18651869 ret = tegra_vi_graph_parse_one (chan , remote );
18661870 fwnode_handle_put (remote );
18671871 if (ret < 0 || list_empty (& chan -> notifier .asd_list ))
Original file line number Diff line number Diff line change @@ -397,9 +397,6 @@ struct fwnode_handle *fwnode_graph_get_remote_port(
397397 const struct fwnode_handle * fwnode );
398398struct fwnode_handle * fwnode_graph_get_remote_endpoint (
399399 const struct fwnode_handle * fwnode );
400- struct fwnode_handle *
401- fwnode_graph_get_remote_node (const struct fwnode_handle * fwnode , u32 port ,
402- u32 endpoint );
403400
404401static inline bool fwnode_graph_is_endpoint (struct fwnode_handle * fwnode )
405402{
You can’t perform that action at this time.
0 commit comments