Commit 8c54e778 authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by popcornmix
Browse files

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: default avatarChen-Yu Tsai <wens@csie.org>
parent 962099a5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -945,8 +945,6 @@ static int vidioc_querycap(struct file *file, void *priv,
	strncpy(cap->card, MEM2MEM_NAME, sizeof(cap->card) - 1);
	snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
		 MEM2MEM_NAME);
	cap->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;
	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
	return 0;
}

@@ -2600,6 +2598,7 @@ static int bcm2835_codec_create(struct platform_device *pdev,
	vfd = &dev->vfd;
	vfd->lock = &dev->dev_mutex;
	vfd->v4l2_dev = &dev->v4l2_dev;
	vfd->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;

	switch (role) {
	case DECODE: