Skip to contentSkip to conversation

media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad()

PATCH In review Vaishnav Achath 3 participants 3 messages Apr 21, 2023 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad()

While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev sinks, the check is_media_entity_v4l2_subdev() was not removed which prevented the function from being used with non-subdev sinks, Drop the unnecessary check.

Fixes bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()")
---
 drivers/media/v4l2-core/v4l2-mc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/v4l2-core/v4l2-mc.c +1 -2
index bf0c18100664..22fe08fce0a9 100644
@@ -314,8 +314,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
 {
 	struct fwnode_handle *endpoint;
 
-	if (!(sink->flags & MEDIA_PAD_FL_SINK) ||
-	    !is_media_entity_v4l2_subdev(sink->entity))
+	if (!(sink->flags & MEDIA_PAD_FL_SINK))
 		return -EINVAL;
 
 	fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Vaishnav,

Thank you for the patch.

Quoted 8 lines · Vaishnav Achath

While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev sinks, the check is_media_entity_v4l2_subdev() was not removed which prevented the function from being used with non-subdev sinks, Drop the unnecessary check.

Fixes bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()")

Sakari, the commit this patch fixes will land in v6.4, should this be merged as a v6.4 fix ?

Quoted 18 lines
---
 drivers/media/v4l2-core/v4l2-mc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/v4l2-core/v4l2-mc.c +1 -2
index bf0c18100664..22fe08fce0a9 100644
@@ -314,8 +314,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
 {
 	struct fwnode_handle *endpoint;
 
-	if (!(sink->flags & MEDIA_PAD_FL_SINK) ||
-	    !is_media_entity_v4l2_subdev(sink->entity))
+	if (!(sink->flags & MEDIA_PAD_FL_SINK))
 		return -EINVAL;
 
 	fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw
Quoted 10 lines · Laurent Pinchart

Hi Vaishnav,

Thank you for the patch.

Quoted 5 lines · Vaishnav Achath

While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev sinks, the check is_media_entity_v4l2_subdev() was not removed which prevented the function from being used with non-subdev sinks, Drop the unnecessary check.

Quoted 8 lines
Quoted 3 lines
Fixes bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()")

Sakari, the commit this patch fixes will land in v6.4, should this be merged as a v6.4 fix ?

I'd think so. I'll take this soonish.

Signature · 1 line
Sakari Ailus