diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-06-26 03:15:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-07-22 15:08:18 -0400 |
commit | 0fe3331e07f0a09c10fd81e48976255b50b2e607 (patch) | |
tree | 7eed61e5e5d074adfa0eecc7427e964571de012f /drivers | |
parent | 3c7812e7ef30d177fd6234d03d1c1612447fd9f8 (diff) |
media: via-camera: 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')
-rw-r--r-- | drivers/media/platform/via-camera.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c index d5f811820be9..4110dc4c771e 100644 --- a/drivers/media/platform/via-camera.c +++ b/drivers/media/platform/via-camera.c @@ -988,9 +988,6 @@ static int viacam_querycap(struct file *filp, void *priv, { strscpy(cap->driver, "via-camera", sizeof(cap->driver)); strscpy(cap->card, "via-camera", sizeof(cap->card)); - cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | - V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; - cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } @@ -1267,6 +1264,8 @@ static const struct video_device viacam_v4l_template = { .fops = &viacam_fops, .ioctl_ops = &viacam_ioctl_ops, .release = video_device_release_empty, /* Check this */ + .device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | + V4L2_CAP_STREAMING, }; /* |