mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
media: mc: fix endpoint iteration
commit fb2bd86270cd0ad004f4c614ba4f8c63a5720e25 upstream.
When creating links from a subdev to a sink, the current logic tries to
iterate over the endpoints of dev's fwnode.
This might not be correct when the subdev uses a different fwnode
compared to the dev's fwnode.
If, when registering, the subdev's fwnode is not set, the code inside
v4l2_async_register_subdev will set it to the dev's fwnode.
To fix this, just use the subdev's fwnode.
Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Fixes: 0d3c81e82d ("media: v4l2-mc: add v4l2_create_fwnode_links helpers")
Cc: stable@vger.kernel.org
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bb58ccba1f
commit
2818d755e6
@@ -321,7 +321,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
|
||||
|
||||
sink_sd = media_entity_to_v4l2_subdev(sink->entity);
|
||||
|
||||
fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {
|
||||
fwnode_graph_for_each_endpoint(src_sd->fwnode, endpoint) {
|
||||
struct fwnode_handle *remote_ep;
|
||||
int src_idx, sink_idx, ret;
|
||||
struct media_pad *src;
|
||||
|
||||
Reference in New Issue
Block a user