diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-02-03 13:10:46 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 14:31:53 +0200 |
commit | 8f9acd236d9e6bd805b0dac2d0ca59dcd89edc99 (patch) | |
tree | 1e3c44a67b017fd88e585ce07c54e81d484135b7 /drivers/media/platform/timblogiw.c | |
parent | [media] tef6862: clamp frequency (diff) | |
download | linux-8f9acd236d9e6bd805b0dac2d0ca59dcd89edc99.tar.xz linux-8f9acd236d9e6bd805b0dac2d0ca59dcd89edc99.zip |
[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>
Diffstat (limited to 'drivers/media/platform/timblogiw.c')
-rw-r--r-- | drivers/media/platform/timblogiw.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/platform/timblogiw.c b/drivers/media/platform/timblogiw.c index 99861c631798..b557caf5b1a4 100644 --- a/drivers/media/platform/timblogiw.c +++ b/drivers/media/platform/timblogiw.c @@ -239,13 +239,12 @@ static int timblogiw_querycap(struct file *file, void *priv, struct video_device *vdev = video_devdata(file); dev_dbg(&vdev->dev, "%s: Entry\n", __func__); - memset(cap, 0, sizeof(*cap)); strncpy(cap->card, TIMBLOGIWIN_NAME, sizeof(cap->card)-1); strncpy(cap->driver, DRIVER_NAME, sizeof(cap->driver) - 1); - strlcpy(cap->bus_info, vdev->name, sizeof(cap->bus_info)); - cap->version = TIMBLOGIW_VERSION_CODE; - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | + snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", vdev->name); + cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | V4L2_CAP_READWRITE; + cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } |