aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mxb.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/media/video/mxb.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/media/video/mxb.c')
-rw-r--r--drivers/media/video/mxb.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c
index 3454070e63f0..ef0c8178f255 100644
--- a/drivers/media/video/mxb.c
+++ b/drivers/media/video/mxb.c
@@ -294,7 +294,7 @@ static int mxb_init_done(struct saa7146_dev* dev)
294 /* select tuner-output on saa7111a */ 294 /* select tuner-output on saa7111a */
295 i = 0; 295 i = 0;
296 saa7111a_call(mxb, video, s_routing, SAA7115_COMPOSITE0, 296 saa7111a_call(mxb, video, s_routing, SAA7115_COMPOSITE0,
297 SAA7111_FMT_CCIR | SAA7111_VBI_BYPASS, 0); 297 SAA7111_FMT_CCIR, 0);
298 298
299 /* select a tuner type */ 299 /* select a tuner type */
300 tun_setup.mode_mask = T_ANALOG_TV; 300 tun_setup.mode_mask = T_ANALOG_TV;
@@ -478,7 +478,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
478 478
479 DEB_EE(("VIDIOC_S_INPUT %d.\n", input)); 479 DEB_EE(("VIDIOC_S_INPUT %d.\n", input));
480 480
481 if (input < 0 || input >= MXB_INPUTS) 481 if (input >= MXB_INPUTS)
482 return -EINVAL; 482 return -EINVAL;
483 483
484 mxb->cur_input = input; 484 mxb->cur_input = input;
@@ -518,8 +518,8 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
518 return err; 518 return err;
519 519
520 /* switch video in saa7111a */ 520 /* switch video in saa7111a */
521 if (saa7111a_call(mxb, video, s_routing, i, 0, 0)) 521 if (saa7111a_call(mxb, video, s_routing, i, SAA7111_FMT_CCIR, 0))
522 printk(KERN_ERR "VIDIOC_S_INPUT: could not address saa7111a #1.\n"); 522 printk(KERN_ERR "VIDIOC_S_INPUT: could not address saa7111a.\n");
523 523
524 /* switch the audio-source only if necessary */ 524 /* switch the audio-source only if necessary */
525 if (0 == mxb->cur_mute) 525 if (0 == mxb->cur_mute)
@@ -695,14 +695,17 @@ static struct saa7146_ext_vv vv_data;
695/* this function only gets called when the probing was successful */ 695/* this function only gets called when the probing was successful */
696static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info) 696static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info)
697{ 697{
698 struct mxb *mxb = (struct mxb *)dev->ext_priv; 698 struct mxb *mxb;
699 699
700 DEB_EE(("dev:%p\n", dev)); 700 DEB_EE(("dev:%p\n", dev));
701 701
702 /* checking for i2c-devices can be omitted here, because we
703 already did this in "mxb_vl42_probe" */
704
705 saa7146_vv_init(dev, &vv_data); 702 saa7146_vv_init(dev, &vv_data);
703 if (mxb_probe(dev)) {
704 saa7146_vv_release(dev);
705 return -1;
706 }
707 mxb = (struct mxb *)dev->ext_priv;
708
706 vv_data.ops.vidioc_queryctrl = vidioc_queryctrl; 709 vv_data.ops.vidioc_queryctrl = vidioc_queryctrl;
707 vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl; 710 vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl;
708 vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl; 711 vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl;
@@ -722,6 +725,7 @@ static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data
722 vv_data.ops.vidioc_default = vidioc_default; 725 vv_data.ops.vidioc_default = vidioc_default;
723 if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) { 726 if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) {
724 ERR(("cannot register capture v4l2 device. skipping.\n")); 727 ERR(("cannot register capture v4l2 device. skipping.\n"));
728 saa7146_vv_release(dev);
725 return -1; 729 return -1;
726 } 730 }
727 731
@@ -842,7 +846,6 @@ static struct saa7146_extension extension = {
842 .pci_tbl = &pci_tbl[0], 846 .pci_tbl = &pci_tbl[0],
843 .module = THIS_MODULE, 847 .module = THIS_MODULE,
844 848
845 .probe = mxb_probe,
846 .attach = mxb_attach, 849 .attach = mxb_attach,
847 .detach = mxb_detach, 850 .detach = mxb_detach,
848 851