summaryrefslogtreecommitdiff
path: root/drivers/media/usb/au0828/au0828-video.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-03-11 16:12:17 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-25 15:10:33 -0300
commitde8d2bbf0a6bebce51a2ab08adbb0dd897825777 (patch)
tree917a246f9fba0915b8b6d2ad5859575614c1b2f3 /drivers/media/usb/au0828/au0828-video.c
parentfa09cb9a992be135fa6f3ac8a0841c478f29d844 (diff)
[media] au0828: don't change global state information on open()
Just opening a device shouldn't have any side-effects. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/au0828/au0828-video.c')
-rw-r--r--drivers/media/usb/au0828/au0828-video.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index 2f24e54cb837..6f2a6264d173 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -1005,11 +1005,6 @@ static int au0828_v4l2_open(struct file *filp)
printk(KERN_INFO "Au0828 can't set alternate to 5!\n");
return -EBUSY;
}
- dev->width = NTSC_STD_W;
- dev->height = NTSC_STD_H;
- dev->frame_size = dev->width * dev->height * 2;
- dev->field_size = dev->width * dev->height;
- dev->bytesperline = dev->width * 2;
au0828_analog_stream_enable(dev);
au0828_analog_stream_reset(dev);
@@ -1031,8 +1026,6 @@ static int au0828_v4l2_open(struct file *filp)
&dev->lock);
/* VBI Setup */
- dev->vbi_width = 720;
- dev->vbi_height = 1;
videobuf_queue_vmalloc_init(&fh->vb_vbiq, &au0828_vbi_qops,
NULL, &dev->slock,
V4L2_BUF_TYPE_VBI_CAPTURE,
@@ -1984,6 +1977,8 @@ int au0828_analog_register(struct au0828_dev *dev,
dev->field_size = dev->width * dev->height;
dev->frame_size = dev->field_size << 1;
dev->bytesperline = dev->width << 1;
+ dev->vbi_width = 720;
+ dev->vbi_height = 1;
dev->ctrl_ainput = 0;
dev->ctrl_freq = 960;
dev->std = V4L2_STD_NTSC_M;