1 From 0a6b5553c36ad35134e5cb250fe52d52755ebde2 Mon Sep 17 00:00:00 2001
2 From: Chen-Yu Tsai <wens@csie.org>
3 Date: Mon, 22 Jul 2019 22:20:55 +0800
4 Subject: [PATCH 745/782] staging: bcm2835-codec: set device_caps in struct
7 Instead of filling in the struct v4l2_capability device_caps
8 field, fill in the struct video_device device_caps field.
10 That way the V4L2 core knows what the capabilities of the
13 This is similar to a cleanup series by Hans Verkuil [1].
15 [1] https://www.spinics.net/lists/linux-media/msg153313.html
17 Signed-off-by: Chen-Yu Tsai <wens@csie.org>
19 .../staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 3 +--
20 1 file changed, 1 insertion(+), 2 deletions(-)
22 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
23 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
24 @@ -945,8 +945,6 @@ static int vidioc_querycap(struct file *
25 strncpy(cap->card, MEM2MEM_NAME, sizeof(cap->card) - 1);
26 snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
28 - cap->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;
29 - cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
33 @@ -2600,6 +2598,7 @@ static int bcm2835_codec_create(struct p
35 vfd->lock = &dev->dev_mutex;
36 vfd->v4l2_dev = &dev->v4l2_dev;
37 + vfd->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;