summary refs log tree commit diff
path: root/drivers/media/platform/vsp1/vsp1_lif.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2016-02-15 22:10:26 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-06-28 12:12:26 -0300
commit6a8e07b215a91be310dac358fdccd7709dd2458f (patch)
treefcd401556849d13e4da460d9aa615f8b7d0b6bdf /drivers/media/platform/vsp1/vsp1_lif.c
parent8d954abe30fcf1e979473abb0f3cf2f18c0d13e0 (diff)
downloadlinux-6a8e07b215a91be310dac358fdccd7709dd2458f.tar.gz
[media] v4l: vsp1: Set entities functions
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_lif.c')
-rw-r--r--drivers/media/platform/vsp1/vsp1_lif.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_lif.c b/drivers/media/platform/vsp1/vsp1_lif.c
index e554b3150748..e006f0df3ce9 100644
--- a/drivers/media/platform/vsp1/vsp1_lif.c
+++ b/drivers/media/platform/vsp1/vsp1_lif.c
@@ -165,7 +165,12 @@ struct vsp1_lif *vsp1_lif_create(struct vsp1_device *vsp1)
 	lif->entity.ops = &lif_entity_ops;
 	lif->entity.type = VSP1_ENTITY_LIF;
 
-	ret = vsp1_entity_init(vsp1, &lif->entity, "lif", 2, &lif_ops);
+	/* The LIF is never exposed to userspace, but media entity registration
+	 * requires a function to be set. Use PROC_VIDEO_PIXEL_FORMATTER just to
+	 * avoid triggering a WARN_ON(), the value won't be seen anywhere.
+	 */
+	ret = vsp1_entity_init(vsp1, &lif->entity, "lif", 2, &lif_ops,
+			       MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER);
 	if (ret < 0)
 		return ERR_PTR(ret);