forked from Minki/linux
[media] staging/media: fix querycap
Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
dfdf780b46
commit
57e774cc91
@ -2327,9 +2327,10 @@ static int bcm2048_vidioc_querycap(struct file *file, void *priv,
|
||||
strlcpy(capability->card, BCM2048_DRIVER_CARD,
|
||||
sizeof(capability->card));
|
||||
snprintf(capability->bus_info, 32, "I2C: 0x%X", bdev->client->addr);
|
||||
capability->version = BCM2048_DRIVER_VERSION;
|
||||
capability->capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO |
|
||||
capability->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO |
|
||||
V4L2_CAP_HW_FREQ_SEEK;
|
||||
capability->capabilities = capability->device_caps |
|
||||
V4L2_CAP_DEVICE_CAPS;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -600,11 +600,11 @@ static int vpfe_querycap(struct file *file, void *priv,
|
||||
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_querycap\n");
|
||||
|
||||
if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||
else
|
||||
cap->capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
|
||||
cap->device_caps = cap->capabilities;
|
||||
cap->version = VPFE_CAPTURE_VERSION_CODE;
|
||||
cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
|
||||
cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT |
|
||||
V4L2_CAP_STREAMING | V4L2_CAP_DEVICE_CAPS;
|
||||
strlcpy(cap->driver, CAPTURE_DRV_NAME, sizeof(cap->driver));
|
||||
strlcpy(cap->bus_info, "VPFE", sizeof(cap->bus_info));
|
||||
strlcpy(cap->card, vpfe_dev->cfg->card_name, sizeof(cap->card));
|
||||
|
@ -512,10 +512,9 @@ dt3155_ioc_querycap(struct file *filp, void *p, struct v4l2_capability *cap)
|
||||
strcpy(cap->driver, DT3155_NAME);
|
||||
strcpy(cap->card, DT3155_NAME " frame grabber");
|
||||
sprintf(cap->bus_info, "PCI:%s", pci_name(pd->pdev));
|
||||
cap->version =
|
||||
KERNEL_VERSION(DT3155_VER_MAJ, DT3155_VER_MIN, DT3155_VER_EXT);
|
||||
cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
|
||||
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
|
||||
DT3155_CAPTURE_METHOD;
|
||||
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user