summary refs log tree commit diff
path: root/drivers/media/platform/s5p-g2d/g2d.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-06-26 02:51:41 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-07-22 14:45:40 -0400
commit994587c3b27615fd0309ce61fe2cc5695a64b934 (patch)
treecd996b27a4bd6f9ba0e65b648229db3f35652e61 /drivers/media/platform/s5p-g2d/g2d.c
parente7999846b9448a84083a913f0e882a93b4d9d123 (diff)
downloadlinux-994587c3b27615fd0309ce61fe2cc5695a64b934.tar.gz
media: s3c-camif/s5p-g2d/s5p-jpeg: set device_caps in struct video_device
Instead of filling in the struct v4l2_capability device_caps
field, fill in the struct video_device device_caps field.

That way the V4L2 core knows what the capabilities of the
video device are.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/s5p-g2d/g2d.c')
-rw-r--r--drivers/media/platform/s5p-g2d/g2d.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index b3fc0ff8a5ec..f5f05ea9f521 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -291,8 +291,6 @@ static int vidioc_querycap(struct file *file, void *priv,
 	strscpy(cap->driver, G2D_NAME, sizeof(cap->driver));
 	strscpy(cap->card, G2D_NAME, sizeof(cap->card));
 	cap->bus_info[0] = 0;
-	cap->device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING;
-	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
 	return 0;
 }
 
@@ -696,6 +694,7 @@ static int g2d_probe(struct platform_device *pdev)
 	set_bit(V4L2_FL_QUIRK_INVERTED_CROP, &vfd->flags);
 	vfd->lock = &dev->mutex;
 	vfd->v4l2_dev = &dev->v4l2_dev;
+	vfd->device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING;
 	ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
 	if (ret) {
 		v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");