[media] timblogiw: fix querycap
Don't set version (the core does that for you), fill in device_caps and prefix bus_info with "platform:". Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
fa915996fb
commit
8f9acd236d
|
@ -239,13 +239,12 @@ static int timblogiw_querycap(struct file *file, void *priv,
|
||||||
struct video_device *vdev = video_devdata(file);
|
struct video_device *vdev = video_devdata(file);
|
||||||
|
|
||||||
dev_dbg(&vdev->dev, "%s: Entry\n", __func__);
|
dev_dbg(&vdev->dev, "%s: Entry\n", __func__);
|
||||||
memset(cap, 0, sizeof(*cap));
|
|
||||||
strncpy(cap->card, TIMBLOGIWIN_NAME, sizeof(cap->card)-1);
|
strncpy(cap->card, TIMBLOGIWIN_NAME, sizeof(cap->card)-1);
|
||||||
strncpy(cap->driver, DRIVER_NAME, sizeof(cap->driver) - 1);
|
strncpy(cap->driver, DRIVER_NAME, sizeof(cap->driver) - 1);
|
||||||
strlcpy(cap->bus_info, vdev->name, sizeof(cap->bus_info));
|
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", vdev->name);
|
||||||
cap->version = TIMBLOGIW_VERSION_CODE;
|
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
|
||||||
cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
|
|
||||||
V4L2_CAP_READWRITE;
|
V4L2_CAP_READWRITE;
|
||||||
|
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue