From: Hans Verkuil Date: Mon, 24 Nov 2014 09:37:22 +0000 (-0300) Subject: [media] staging/media: fix querycap X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=57e774cc916efa293471bf12d1177574e121378e;p=linux-beck.git [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 Acked-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index bdc6854d8b53..60a57b2a8fb2 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -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; } diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 6f9171c39bdc..06d48d5eb0a0 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -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)); diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index 40580228a6c7..293ffda503e0 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c +++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c @@ -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; }