aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-ioctl.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-11-07 05:25:10 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-23 13:44:24 -0500
commitd0c8b2d400279f7d4d530ede8c7cb66f75810007 (patch)
tree004af537a39103355c4b79836095996ced3ed40f /drivers/media/video/ivtv/ivtv-ioctl.c
parenta8187c42fbe594754eadd37cf16d3ad7c704869d (diff)
[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.c7
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 c4bc48143098..b0630773e507 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
754 754
755static int ivtv_querycap(struct file *file, void *fh, struct v4l2_capability *vcap) 755static int ivtv_querycap(struct file *file, void *fh, struct v4l2_capability *vcap)
756{ 756{
757 struct ivtv *itv = fh2id(fh)->itv; 757 struct ivtv_open_id *id = fh2id(file->private_data);
758 struct ivtv *itv = id->itv;
759 struct ivtv_stream *s = &itv->streams[id->type];
758 760
759 strlcpy(vcap->driver, IVTV_DRIVER_NAME, sizeof(vcap->driver)); 761 strlcpy(vcap->driver, IVTV_DRIVER_NAME, sizeof(vcap->driver));
760 strlcpy(vcap->card, itv->card_name, sizeof(vcap->card)); 762 strlcpy(vcap->card, itv->card_name, sizeof(vcap->card));
761 snprintf(vcap->bus_info, sizeof(vcap->bus_info), "PCI:%s", pci_name(itv->pdev)); 763 snprintf(vcap->bus_info, sizeof(vcap->bus_info), "PCI:%s", pci_name(itv->pdev));
762 vcap->capabilities = itv->v4l2_cap; /* capabilities */ 764 vcap->capabilities = itv->v4l2_cap | V4L2_CAP_DEVICE_CAPS;
765 vcap->device_caps = s->caps;
763 return 0; 766 return 0;
764} 767}
765 768