diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2011-11-07 07:25:10 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-23 16:44:24 -0200 |
commit | d0c8b2d400279f7d4d530ede8c7cb66f75810007 (patch) | |
tree | 004af537a39103355c4b79836095996ced3ed40f /drivers/media/video/ivtv/ivtv-ioctl.c | |
parent | a8187c42fbe594754eadd37cf16d3ad7c704869d (diff) | |
download | op-kernel-dev-d0c8b2d400279f7d4d530ede8c7cb66f75810007.zip op-kernel-dev-d0c8b2d400279f7d4d530ede8c7cb66f75810007.tar.gz |
[media] ivtv: setup per-device caps
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index c4bc481..b063077 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c @@ -754,12 +754,15 @@ static int ivtv_s_register(struct file *file, void *fh, struct v4l2_dbg_register static int ivtv_querycap(struct file *file, void *fh, struct v4l2_capability *vcap) { - struct ivtv *itv = fh2id(fh)->itv; + struct ivtv_open_id *id = fh2id(file->private_data); + struct ivtv *itv = id->itv; + struct ivtv_stream *s = &itv->streams[id->type]; strlcpy(vcap->driver, IVTV_DRIVER_NAME, sizeof(vcap->driver)); strlcpy(vcap->card, itv->card_name, sizeof(vcap->card)); snprintf(vcap->bus_info, sizeof(vcap->bus_info), "PCI:%s", pci_name(itv->pdev)); - vcap->capabilities = itv->v4l2_cap; /* capabilities */ + vcap->capabilities = itv->v4l2_cap | V4L2_CAP_DEVICE_CAPS; + vcap->device_caps = s->caps; return 0; } |