diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-17 15:48:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-17 15:48:18 -0400 |
commit | 54a772b8aace3df8ad6af0bd0748f57d27f72b1d (patch) | |
tree | bb75460187efc5b699491da9cd7fa423e8de7b4b /drivers/media/video | |
parent | a6b52a9db891e2a39e8a0fed6005935d8b1aa59c (diff) | |
parent | a1ad5ec7f520c559becab2e989a397f1d6ac5eb0 (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
[media] tuner-core: fix a 2.6.39 regression with mt20xx
[media] dvb_frontend: fix race condition in stopping/starting frontend
[media] media: fix radio-sf16fmr2 build when SND is not enabled
[media] MEDIA: Fix non-ISA_DMA_API link failure of sound code
[media] nuvoton-cir: make idle timeout more sane
[media] mceusb: increase default timeout to 100ms
[media] mceusb: Timeout unit corrections
[media] Revert "V4L/DVB: cx23885: Enable Message Signaled Interrupts(MSI)"
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-core.c | 9 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 16 |
2 files changed, 14 insertions, 11 deletions
diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index 64d9b2136ff6..419777a832ee 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c | |||
@@ -2060,12 +2060,8 @@ static int __devinit cx23885_initdev(struct pci_dev *pci_dev, | |||
2060 | goto fail_irq; | 2060 | goto fail_irq; |
2061 | } | 2061 | } |
2062 | 2062 | ||
2063 | if (!pci_enable_msi(pci_dev)) | 2063 | err = request_irq(pci_dev->irq, cx23885_irq, |
2064 | err = request_irq(pci_dev->irq, cx23885_irq, | 2064 | IRQF_SHARED | IRQF_DISABLED, dev->name, dev); |
2065 | IRQF_DISABLED, dev->name, dev); | ||
2066 | else | ||
2067 | err = request_irq(pci_dev->irq, cx23885_irq, | ||
2068 | IRQF_SHARED | IRQF_DISABLED, dev->name, dev); | ||
2069 | if (err < 0) { | 2065 | if (err < 0) { |
2070 | printk(KERN_ERR "%s: can't get IRQ %d\n", | 2066 | printk(KERN_ERR "%s: can't get IRQ %d\n", |
2071 | dev->name, pci_dev->irq); | 2067 | dev->name, pci_dev->irq); |
@@ -2114,7 +2110,6 @@ static void __devexit cx23885_finidev(struct pci_dev *pci_dev) | |||
2114 | 2110 | ||
2115 | /* unregister stuff */ | 2111 | /* unregister stuff */ |
2116 | free_irq(pci_dev->irq, dev); | 2112 | free_irq(pci_dev->irq, dev); |
2117 | pci_disable_msi(pci_dev); | ||
2118 | 2113 | ||
2119 | cx23885_dev_unregister(dev); | 2114 | cx23885_dev_unregister(dev); |
2120 | v4l2_device_unregister(v4l2_dev); | 2115 | v4l2_device_unregister(v4l2_dev); |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index cfa9f7efe93d..a03945ab9f08 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -714,10 +714,19 @@ static int tuner_remove(struct i2c_client *client) | |||
714 | * returns 0. | 714 | * returns 0. |
715 | * This function is needed for boards that have a separate tuner for | 715 | * This function is needed for boards that have a separate tuner for |
716 | * radio (like devices with tea5767). | 716 | * radio (like devices with tea5767). |
717 | * NOTE: mt20xx uses V4L2_TUNER_DIGITAL_TV and calls set_tv_freq to | ||
718 | * select a TV frequency. So, t_mode = T_ANALOG_TV could actually | ||
719 | * be used to represent a Digital TV too. | ||
717 | */ | 720 | */ |
718 | static inline int check_mode(struct tuner *t, enum v4l2_tuner_type mode) | 721 | static inline int check_mode(struct tuner *t, enum v4l2_tuner_type mode) |
719 | { | 722 | { |
720 | if ((1 << mode & t->mode_mask) == 0) | 723 | int t_mode; |
724 | if (mode == V4L2_TUNER_RADIO) | ||
725 | t_mode = T_RADIO; | ||
726 | else | ||
727 | t_mode = T_ANALOG_TV; | ||
728 | |||
729 | if ((t_mode & t->mode_mask) == 0) | ||
721 | return -EINVAL; | 730 | return -EINVAL; |
722 | 731 | ||
723 | return 0; | 732 | return 0; |
@@ -984,7 +993,7 @@ static void tuner_status(struct dvb_frontend *fe) | |||
984 | case V4L2_TUNER_RADIO: | 993 | case V4L2_TUNER_RADIO: |
985 | p = "radio"; | 994 | p = "radio"; |
986 | break; | 995 | break; |
987 | case V4L2_TUNER_DIGITAL_TV: | 996 | case V4L2_TUNER_DIGITAL_TV: /* Used by mt20xx */ |
988 | p = "digital TV"; | 997 | p = "digital TV"; |
989 | break; | 998 | break; |
990 | case V4L2_TUNER_ANALOG_TV: | 999 | case V4L2_TUNER_ANALOG_TV: |
@@ -1135,9 +1144,8 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | |||
1135 | return 0; | 1144 | return 0; |
1136 | if (vt->type == t->mode && analog_ops->get_afc) | 1145 | if (vt->type == t->mode && analog_ops->get_afc) |
1137 | vt->afc = analog_ops->get_afc(&t->fe); | 1146 | vt->afc = analog_ops->get_afc(&t->fe); |
1138 | if (vt->type == V4L2_TUNER_ANALOG_TV) | 1147 | if (t->mode != V4L2_TUNER_RADIO) { |
1139 | vt->capability |= V4L2_TUNER_CAP_NORM; | 1148 | vt->capability |= V4L2_TUNER_CAP_NORM; |
1140 | if (vt->type != V4L2_TUNER_RADIO) { | ||
1141 | vt->rangelow = tv_range[0] * 16; | 1149 | vt->rangelow = tv_range[0] * 16; |
1142 | vt->rangehigh = tv_range[1] * 16; | 1150 | vt->rangehigh = tv_range[1] * 16; |
1143 | return 0; | 1151 | return 0; |