Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 7e27409

Browse files
Laurent Pinchartgregkh
Laurent Pinchart
authored andcommittedOct 10, 2024
media: sun4i_csi: Implement link validate for sun4i_csi subdev
commit 2dc5d5d upstream. 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. Fixes: 577bbf2 ("media: sunxi: Add A10 CSI driver") Cc: stable@vger.kernel.org Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6f5b3c9 commit 7e27409

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ static const struct media_entity_operations sun4i_csi_video_entity_ops = {
3939
.link_validate = v4l2_subdev_link_validate,
4040
};
4141

42+
static const struct media_entity_operations sun4i_csi_subdev_entity_ops = {
43+
.link_validate = v4l2_subdev_link_validate,
44+
};
45+
4246
static int sun4i_csi_notify_bound(struct v4l2_async_notifier *notifier,
4347
struct v4l2_subdev *subdev,
4448
struct v4l2_async_connection *asd)
@@ -214,6 +218,7 @@ static int sun4i_csi_probe(struct platform_device *pdev)
214218
subdev->internal_ops = &sun4i_csi_subdev_internal_ops;
215219
subdev->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
216220
subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
221+
subdev->entity.ops = &sun4i_csi_subdev_entity_ops;
217222
subdev->owner = THIS_MODULE;
218223
snprintf(subdev->name, sizeof(subdev->name), "sun4i-csi-0");
219224
v4l2_set_subdevdata(subdev, csi);

0 commit comments

Comments
 (0)