diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-11-24 12:37:21 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-02 16:28:48 +0300 |
commit | dfdf780b4651cf4932b96d3fe296230afacc360a (patch) | |
tree | 5818119d63a94b8b7ee3474af1ca0028c13385c0 /drivers/media/pci/cx18/cx18-ioctl.c | |
parent | 1fb69bfd29e4b2e5e93922105326dd6cbd5ef6eb (diff) | |
download | linux-dfdf780b4651cf4932b96d3fe296230afacc360a.tar.xz |
[media] cx18: add device_caps support
This was missing in this driver, so add this functionality.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cx18/cx18-ioctl.c')
-rw-r--r-- | drivers/media/pci/cx18/cx18-ioctl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c index 71963db3d92b..b8e4b68a9196 100644 --- a/drivers/media/pci/cx18/cx18-ioctl.c +++ b/drivers/media/pci/cx18/cx18-ioctl.c @@ -393,15 +393,16 @@ static int cx18_querycap(struct file *file, void *fh, struct v4l2_capability *vcap) { struct cx18_open_id *id = fh2id(fh); + struct cx18_stream *s = video_drvdata(file); struct cx18 *cx = id->cx; strlcpy(vcap->driver, CX18_DRIVER_NAME, sizeof(vcap->driver)); strlcpy(vcap->card, cx->card_name, sizeof(vcap->card)); snprintf(vcap->bus_info, sizeof(vcap->bus_info), "PCI:%s", pci_name(cx->pci_dev)); - vcap->capabilities = cx->v4l2_cap; /* capabilities */ - if (id->type == CX18_ENC_STREAM_TYPE_YUV) - vcap->capabilities |= V4L2_CAP_STREAMING; + vcap->capabilities = cx->v4l2_cap; /* capabilities */ + vcap->device_caps = s->v4l2_dev_caps; /* device capabilities */ + vcap->capabilities |= V4L2_CAP_DEVICE_CAPS; return 0; } |