mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 18:40:10 +00:00
staging: bcm2835-codec: 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. This is similar to a cleanup series by Hans Verkuil [1]. [1] https://www.spinics.net/lists/linux-media/msg153313.html Signed-off-by: Chen-Yu Tsai <wens@csie.org>
This commit is contained in:
committed by
Phil Elwell
parent
bfbe58b694
commit
e151d13c3f
@@ -945,8 +945,6 @@ static int vidioc_querycap(struct file *file, void *priv,
|
|||||||
strncpy(cap->card, MEM2MEM_NAME, sizeof(cap->card) - 1);
|
strncpy(cap->card, MEM2MEM_NAME, sizeof(cap->card) - 1);
|
||||||
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
|
||||||
MEM2MEM_NAME);
|
MEM2MEM_NAME);
|
||||||
cap->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;
|
|
||||||
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2600,6 +2598,7 @@ static int bcm2835_codec_create(struct platform_device *pdev,
|
|||||||
vfd = &dev->vfd;
|
vfd = &dev->vfd;
|
||||||
vfd->lock = &dev->dev_mutex;
|
vfd->lock = &dev->dev_mutex;
|
||||||
vfd->v4l2_dev = &dev->v4l2_dev;
|
vfd->v4l2_dev = &dev->v4l2_dev;
|
||||||
|
vfd->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;
|
||||||
|
|
||||||
switch (role) {
|
switch (role) {
|
||||||
case DECODE:
|
case DECODE:
|
||||||
|
|||||||
Reference in New Issue
Block a user