media: sun4i_csi: Implement link validate for sun4i_csi subdev
commit2dc5d5d401upstream. 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:577bbf23b7("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
595f3a4c65
commit
862ab6b7c7
@@ -40,6 +40,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_subdev *asd)
|
||||
@@ -218,6 +222,7 @@ static int sun4i_csi_probe(struct platform_device *pdev)
|
||||
v4l2_subdev_init(subdev, &sun4i_csi_subdev_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);
|
||||
|
||||
Reference in New Issue
Block a user