@@ -424,7 +424,9 @@ struct vsp1_bru *vsp1_bru_create(struct vsp1_device *vsp1)
subdev = &bru->entity.subdev;
v4l2_subdev_init(subdev, &bru_ops);
+ subdev->entity.function = MEDIA_ENT_F_PROC_VIDEO_COMPOSER;
subdev->entity.ops = &vsp1->media_ops;
+
subdev->internal_ops = &vsp1_subdev_internal_ops;
snprintf(subdev->name, sizeof(subdev->name), "%s bru",
dev_name(vsp1->dev));
@@ -203,7 +203,9 @@ struct vsp1_hsit *vsp1_hsit_create(struct vsp1_device *vsp1, bool inverse)
subdev = &hsit->entity.subdev;
v4l2_subdev_init(subdev, &hsit_ops);
+ subdev->entity.function = MEDIA_ENT_F_PROC_VIDEO_CONVERTER;
subdev->entity.ops = &vsp1->media_ops;
+
subdev->internal_ops = &vsp1_subdev_internal_ops;
snprintf(subdev->name, sizeof(subdev->name), "%s %s",
dev_name(vsp1->dev), inverse ? "hsi" : "hst");
@@ -223,7 +223,9 @@ struct vsp1_lif *vsp1_lif_create(struct vsp1_device *vsp1)
subdev = &lif->entity.subdev;
v4l2_subdev_init(subdev, &lif_ops);
+ subdev->entity.function = MEDIA_ENT_F_PROC_VIDEO_GENERIC;
subdev->entity.ops = &vsp1->media_ops;
+
subdev->internal_ops = &vsp1_subdev_internal_ops;
snprintf(subdev->name, sizeof(subdev->name), "%s lif",
dev_name(vsp1->dev));
@@ -237,7 +237,9 @@ struct vsp1_lut *vsp1_lut_create(struct vsp1_device *vsp1)
subdev = &lut->entity.subdev;
v4l2_subdev_init(subdev, &lut_ops);
+ subdev->entity.function = MEDIA_ENT_F_PROC_VIDEO_GENERIC;
subdev->entity.ops = &vsp1->media_ops;
+
subdev->internal_ops = &vsp1_subdev_internal_ops;
snprintf(subdev->name, sizeof(subdev->name), "%s lut",
dev_name(vsp1->dev));
@@ -245,7 +245,9 @@ struct vsp1_rwpf *vsp1_rpf_create(struct vsp1_device *vsp1, unsigned int index)
subdev = &rpf->entity.subdev;
v4l2_subdev_init(subdev, &rpf_ops);
+ subdev->entity.function = MEDIA_ENT_F_PROC_VIDEO_CONVERTER;
subdev->entity.ops = &vsp1->media_ops;
+
subdev->internal_ops = &vsp1_subdev_internal_ops;
snprintf(subdev->name, sizeof(subdev->name), "%s rpf.%u",
dev_name(vsp1->dev), index);
@@ -363,7 +363,9 @@ struct vsp1_sru *vsp1_sru_create(struct vsp1_device *vsp1)
subdev = &sru->entity.subdev;
v4l2_subdev_init(subdev, &sru_ops);
+ subdev->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
subdev->entity.ops = &vsp1->media_ops;
+
subdev->internal_ops = &vsp1_subdev_internal_ops;
snprintf(subdev->name, sizeof(subdev->name), "%s sru",
dev_name(vsp1->dev));
@@ -338,7 +338,9 @@ struct vsp1_uds *vsp1_uds_create(struct vsp1_device *vsp1, unsigned int index)
subdev = &uds->entity.subdev;
v4l2_subdev_init(subdev, &uds_ops);
+ subdev->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;
subdev->entity.ops = &vsp1->media_ops;
+
subdev->internal_ops = &vsp1_subdev_internal_ops;
snprintf(subdev->name, sizeof(subdev->name), "%s uds.%u",
dev_name(vsp1->dev), index);
@@ -244,7 +244,9 @@ struct vsp1_rwpf *vsp1_wpf_create(struct vsp1_device *vsp1, unsigned int index)
subdev = &wpf->entity.subdev;
v4l2_subdev_init(subdev, &wpf_ops);
+ subdev->entity.function = MEDIA_ENT_F_PROC_VIDEO_CONVERTER;
subdev->entity.ops = &vsp1->media_ops;
+
subdev->internal_ops = &vsp1_subdev_internal_ops;
snprintf(subdev->name, sizeof(subdev->name), "%s wpf.%u",
dev_name(vsp1->dev), index);
Initialize the function field of all subdev entities instantiated by the driver. This gets rids of multiple warnings printed by the media controller core. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/media/platform/vsp1/vsp1_bru.c | 2 ++ drivers/media/platform/vsp1/vsp1_hsit.c | 2 ++ drivers/media/platform/vsp1/vsp1_lif.c | 2 ++ drivers/media/platform/vsp1/vsp1_lut.c | 2 ++ drivers/media/platform/vsp1/vsp1_rpf.c | 2 ++ drivers/media/platform/vsp1/vsp1_sru.c | 2 ++ drivers/media/platform/vsp1/vsp1_uds.c | 2 ++ drivers/media/platform/vsp1/vsp1_wpf.c | 2 ++ 8 files changed, 16 insertions(+)