aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 13:21:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 13:21:51 -0400
commitab11ca34eea8fda7a1a9302d86f6ef6108ffd68f (patch)
tree987ec6c263f3dfa4a7a6f9ce4d5ece47cbc12e29 /drivers/media/video/em28xx/em28xx-video.c
parentf9369910a6225b8d4892c3f20ae740a711cd5ace (diff)
parent71006fb22b0f5a2045605b3887ee99a0e9adafe4 (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - some V4L2 API updates needed by embedded devices - DVB API extensions for ATSC-MH delivery system, used in US for mobile TV - new tuners for fc0011/0012/0013 and tua9001 - a new dvb driver for af9033/9035 - a new ATSC-MH frontend (lg2160) - new remote controller keymaps - Removal of a few legacy webcam driver that got replaced by gspca on several kernel versions ago - a new driver for Exynos 4/5 webcams(s5pp fimc-lite) - a new webcam sensor driver (smiapp) - a new video input driver for embedded (sta2x1xx) - several improvements, fixes, cleanups, etc inside the drivers. Manually fix up conflicts due to err() -> dev_err() conversion in drivers/staging/media/easycap/easycap_main.c * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (484 commits) [media] saa7134-cards: Remove a PCI entry added by mistake [media] radio-sf16fmi: add support for SF16-FMD [media] rc-loopback: remove duplicate line [media] patch for Asus My Cinema PS3-100 (1043:48cd) [media] au0828: Move the Kconfig knob under V4L_USB_DRIVERS [media] em28xx: simple comment fix [media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2 [media] smiapp: Use v4l2_ctrl_new_int_menu() instead of v4l2_ctrl_new_custom() [media] smiapp: Add support for 8-bit uncompressed formats [media] smiapp: Allow generic quirk registers [media] smiapp: Use non-binning limits if the binning limit is zero [media] smiapp: Initialise rval in smiapp_read_nvm() [media] smiapp: Round minimum pre_pll up rather than down in ip_clk_freq check [media] smiapp: Use 8-bit reads only before identifying the sensor [media] smiapp: Quirk for sensors that only do 8-bit reads [media] smiapp: Pass struct sensor to register writing commands instead of i2c_client [media] smiapp: Allow using external clock from the clock framework [media] zl10353: change .read_snr() to report SNR as a 0.1 dB [media] media: add support to gspca/pac7302.c for 093a:2627 (Genius FaceCam 300) [media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try ...
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c13
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;