Skip to contentSkip to conversation

media: sun4i_csi: Implement link validate for sun4i_csi subdev

git:media_tree/master Laurent Pinchart 1 participant 1 message Sep 5, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

This is an automatic generated email to let you know that the following patch were queued:

Subject: media: sun4i_csi: Implement link validate for sun4i_csi subdev
Author:  Laurent Pinchart <[email protected]>
Date:    Wed Jun 19 02:46:16 2024 +0300

The sun4i_csi driver doesn't implement link validation for the subdev it registers, leaving the link between the subdev and its source unvalidated. Fix it, using the v4l2_subdev_link_validate() helper.

 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 5 +++++
 1 file changed, 5 insertions(+)

---

drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c +5 -0
index 097a3a08ef7d..dbb26c7b2f8d 100644
@@ -39,6 +39,10 @@ static const struct media_entity_operations sun4i_csi_video_entity_ops = {
 	.link_validate = v4l2_subdev_link_validate,
 };
 
+static const struct media_entity_operations sun4i_csi_subdev_entity_ops = {
+	.link_validate = v4l2_subdev_link_validate,
+};
+
 static int sun4i_csi_notify_bound(struct v4l2_async_notifier *notifier,
 				  struct v4l2_subdev *subdev,
 				  struct v4l2_async_connection *asd)
@@ -214,6 +218,7 @@ static int sun4i_csi_probe(struct platform_device *pdev)
 	subdev->internal_ops = &sun4i_csi_subdev_internal_ops;
 	subdev->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
 	subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
+	subdev->entity.ops = &sun4i_csi_subdev_entity_ops;
 	subdev->owner = THIS_MODULE;
 	snprintf(subdev->name, sizeof(subdev->name), "sun4i-csi-0");
 	v4l2_set_subdevdata(subdev, csi);