diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 324b695c0724..50f5f4fc2148 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -1305,9 +1305,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i) | |||
1305 | if (0 == INPUT(i)->type) | 1305 | if (0 == INPUT(i)->type) |
1306 | return -EINVAL; | 1306 | return -EINVAL; |
1307 | 1307 | ||
1308 | dev->ctl_input = i; | 1308 | video_mux(dev, i); |
1309 | |||
1310 | video_mux(dev, dev->ctl_input); | ||
1311 | return 0; | 1309 | return 0; |
1312 | } | 1310 | } |
1313 | 1311 | ||
@@ -2262,6 +2260,7 @@ static int em28xx_v4l2_close(struct file *filp) | |||
2262 | em28xx_release_resources(dev); | 2260 | em28xx_release_resources(dev); |
2263 | kfree(dev->alt_max_pkt_size); | 2261 | kfree(dev->alt_max_pkt_size); |
2264 | kfree(dev); | 2262 | kfree(dev); |
2263 | kfree(fh); | ||
2265 | return 0; | 2264 | return 0; |
2266 | } | 2265 | } |
2267 | 2266 | ||
@@ -2286,7 +2285,6 @@ static int em28xx_v4l2_close(struct file *filp) | |||
2286 | videobuf_mmap_free(&fh->vb_vbiq); | 2285 | videobuf_mmap_free(&fh->vb_vbiq); |
2287 | kfree(fh); | 2286 | kfree(fh); |
2288 | dev->users--; | 2287 | dev->users--; |
2289 | wake_up_interruptible_nr(&dev->open, 1); | ||
2290 | return 0; | 2288 | return 0; |
2291 | } | 2289 | } |
2292 | 2290 | ||
@@ -2497,6 +2495,10 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev, | |||
2497 | vfd->release = video_device_release; | 2495 | vfd->release = video_device_release; |
2498 | vfd->debug = video_debug; | 2496 | vfd->debug = video_debug; |
2499 | vfd->lock = &dev->lock; | 2497 | vfd->lock = &dev->lock; |
2498 | /* Locking in file operations other than ioctl should be done | ||
2499 | by the driver, not the V4L2 core. | ||
2500 | This driver needs auditing so that this flag can be removed. */ | ||
2501 | set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags); | ||
2500 | 2502 | ||
2501 | snprintf(vfd->name, sizeof(vfd->name), "%s %s", | 2503 | snprintf(vfd->name, sizeof(vfd->name), "%s %s", |
2502 | dev->name, type_name); | 2504 | dev->name, type_name); |
@@ -2518,7 +2520,6 @@ int em28xx_register_analog_devices(struct em28xx *dev) | |||
2518 | dev->norm = em28xx_video_template.current_norm; | 2520 | dev->norm = em28xx_video_template.current_norm; |
2519 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, dev->norm); | 2521 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, dev->norm); |
2520 | dev->interlaced = EM28XX_INTERLACED_DEFAULT; | 2522 | dev->interlaced = EM28XX_INTERLACED_DEFAULT; |
2521 | dev->ctl_input = 0; | ||
2522 | 2523 | ||
2523 | /* Analog specific initialization */ | 2524 | /* Analog specific initialization */ |
2524 | dev->format = &format[0]; | 2525 | dev->format = &format[0]; |
@@ -2532,7 +2533,7 @@ int em28xx_register_analog_devices(struct em28xx *dev) | |||
2532 | em28xx_set_video_format(dev, format[0].fourcc, | 2533 | em28xx_set_video_format(dev, format[0].fourcc, |
2533 | maxw, norm_maxh(dev)); | 2534 | maxw, norm_maxh(dev)); |
2534 | 2535 | ||
2535 | video_mux(dev, dev->ctl_input); | 2536 | video_mux(dev, 0); |
2536 | 2537 | ||
2537 | /* Audio defaults */ | 2538 | /* Audio defaults */ |
2538 | dev->mute = 1; | 2539 | dev->mute = 1; |