diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-11 15:12:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-25 14:10:33 -0400 |
commit | de8d2bbf0a6bebce51a2ab08adbb0dd897825777 (patch) | |
tree | 917a246f9fba0915b8b6d2ad5859575614c1b2f3 /drivers/media/usb/au0828 | |
parent | fa09cb9a992be135fa6f3ac8a0841c478f29d844 (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')
-rw-r--r-- | drivers/media/usb/au0828/au0828-video.c | 9 |
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) | |||
1005 | printk(KERN_INFO "Au0828 can't set alternate to 5!\n"); | 1005 | printk(KERN_INFO "Au0828 can't set alternate to 5!\n"); |
1006 | return -EBUSY; | 1006 | return -EBUSY; |
1007 | } | 1007 | } |
1008 | dev->width = NTSC_STD_W; | ||
1009 | dev->height = NTSC_STD_H; | ||
1010 | dev->frame_size = dev->width * dev->height * 2; | ||
1011 | dev->field_size = dev->width * dev->height; | ||
1012 | dev->bytesperline = dev->width * 2; | ||
1013 | 1008 | ||
1014 | au0828_analog_stream_enable(dev); | 1009 | au0828_analog_stream_enable(dev); |
1015 | au0828_analog_stream_reset(dev); | 1010 | au0828_analog_stream_reset(dev); |
@@ -1031,8 +1026,6 @@ static int au0828_v4l2_open(struct file *filp) | |||
1031 | &dev->lock); | 1026 | &dev->lock); |
1032 | 1027 | ||
1033 | /* VBI Setup */ | 1028 | /* VBI Setup */ |
1034 | dev->vbi_width = 720; | ||
1035 | dev->vbi_height = 1; | ||
1036 | videobuf_queue_vmalloc_init(&fh->vb_vbiq, &au0828_vbi_qops, | 1029 | videobuf_queue_vmalloc_init(&fh->vb_vbiq, &au0828_vbi_qops, |
1037 | NULL, &dev->slock, | 1030 | NULL, &dev->slock, |
1038 | V4L2_BUF_TYPE_VBI_CAPTURE, | 1031 | V4L2_BUF_TYPE_VBI_CAPTURE, |
@@ -1984,6 +1977,8 @@ int au0828_analog_register(struct au0828_dev *dev, | |||
1984 | dev->field_size = dev->width * dev->height; | 1977 | dev->field_size = dev->width * dev->height; |
1985 | dev->frame_size = dev->field_size << 1; | 1978 | dev->frame_size = dev->field_size << 1; |
1986 | dev->bytesperline = dev->width << 1; | 1979 | dev->bytesperline = dev->width << 1; |
1980 | dev->vbi_width = 720; | ||
1981 | dev->vbi_height = 1; | ||
1987 | dev->ctrl_ainput = 0; | 1982 | dev->ctrl_ainput = 0; |
1988 | dev->ctrl_freq = 960; | 1983 | dev->ctrl_freq = 960; |
1989 | dev->std = V4L2_STD_NTSC_M; | 1984 | dev->std = V4L2_STD_NTSC_M; |