diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-07-12 16:58:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-12 19:01:04 -0400 |
commit | fa9846a8c5965636fbade8655ae0ce1f9a655bd4 (patch) | |
tree | 4a011e90cd64eedeeb01bd09e1d3175b3a0edd17 /drivers/media/video/bttv-driver.c | |
parent | de9c634270df3e27675a3c0e95545d2b3f754e3f (diff) |
[PATCH] v4l: BTTV update
- use DMA_32BIT_MASK.
- Rename tuner structures fields.
- Tail spaces removed.
- I2C cleanups and converged to a basic reference structure.
- Removed unused structures.
- Removed BTTV version check.
Signed-off-by: <domen@coderock.org>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-Off-By: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/bttv-driver.c')
-rw-r--r-- | drivers/media/video/bttv-driver.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c index 7d62b394c509..51a0f6d68e73 100644 --- a/drivers/media/video/bttv-driver.c +++ b/drivers/media/video/bttv-driver.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | $Id: bttv-driver.c,v 1.40 2005/06/16 21:38:45 nsh Exp $ | 2 | $Id: bttv-driver.c,v 1.42 2005/07/05 17:37:35 nsh Exp $ |
3 | 3 | ||
4 | bttv - Bt848 frame grabber driver | 4 | bttv - Bt848 frame grabber driver |
5 | 5 | ||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/kdev_t.h> | 37 | #include <linux/kdev_t.h> |
38 | #include <linux/dma-mapping.h> | ||
38 | 39 | ||
39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
40 | #include <asm/byteorder.h> | 41 | #include <asm/byteorder.h> |
@@ -698,12 +699,10 @@ int locked_btres(struct bttv *btv, int bit) | |||
698 | static | 699 | static |
699 | void free_btres(struct bttv *btv, struct bttv_fh *fh, int bits) | 700 | void free_btres(struct bttv *btv, struct bttv_fh *fh, int bits) |
700 | { | 701 | { |
701 | #if 1 /* DEBUG */ | ||
702 | if ((fh->resources & bits) != bits) { | 702 | if ((fh->resources & bits) != bits) { |
703 | /* trying to free ressources not allocated by us ... */ | 703 | /* trying to free ressources not allocated by us ... */ |
704 | printk("bttv: BUG! (btres)\n"); | 704 | printk("bttv: BUG! (btres)\n"); |
705 | } | 705 | } |
706 | #endif | ||
707 | down(&btv->reslock); | 706 | down(&btv->reslock); |
708 | fh->resources &= ~bits; | 707 | fh->resources &= ~bits; |
709 | btv->resources &= ~bits; | 708 | btv->resources &= ~bits; |
@@ -943,11 +942,6 @@ audio_mux(struct bttv *btv, int mode) | |||
943 | i2c_mux = mux = (btv->audio & AUDIO_MUTE) ? AUDIO_OFF : btv->audio; | 942 | i2c_mux = mux = (btv->audio & AUDIO_MUTE) ? AUDIO_OFF : btv->audio; |
944 | if (btv->opt_automute && !signal && !btv->radio_user) | 943 | if (btv->opt_automute && !signal && !btv->radio_user) |
945 | mux = AUDIO_OFF; | 944 | mux = AUDIO_OFF; |
946 | #if 0 | ||
947 | printk("bttv%d: amux: mode=%d audio=%d signal=%s mux=%d/%d irq=%s\n", | ||
948 | btv->c.nr, mode, btv->audio, signal ? "yes" : "no", | ||
949 | mux, i2c_mux, in_interrupt() ? "yes" : "no"); | ||
950 | #endif | ||
951 | 945 | ||
952 | val = bttv_tvcards[btv->c.type].audiomux[mux]; | 946 | val = bttv_tvcards[btv->c.type].audiomux[mux]; |
953 | gpio_bits(bttv_tvcards[btv->c.type].gpiomask,val); | 947 | gpio_bits(bttv_tvcards[btv->c.type].gpiomask,val); |
@@ -994,11 +988,6 @@ set_tvnorm(struct bttv *btv, unsigned int norm) | |||
994 | case BTTV_VOODOOTV_FM: | 988 | case BTTV_VOODOOTV_FM: |
995 | bttv_tda9880_setnorm(btv,norm); | 989 | bttv_tda9880_setnorm(btv,norm); |
996 | break; | 990 | break; |
997 | #if 0 | ||
998 | case BTTV_OSPREY540: | ||
999 | osprey_540_set_norm(btv,norm); | ||
1000 | break; | ||
1001 | #endif | ||
1002 | } | 991 | } |
1003 | return 0; | 992 | return 0; |
1004 | } | 993 | } |
@@ -1849,7 +1838,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg) | |||
1849 | 1838 | ||
1850 | if (unlikely(f->tuner != 0)) | 1839 | if (unlikely(f->tuner != 0)) |
1851 | return -EINVAL; | 1840 | return -EINVAL; |
1852 | if (unlikely(f->type != V4L2_TUNER_ANALOG_TV)) | 1841 | if (unlikely (f->type != V4L2_TUNER_ANALOG_TV)) |
1853 | return -EINVAL; | 1842 | return -EINVAL; |
1854 | down(&btv->lock); | 1843 | down(&btv->lock); |
1855 | btv->freq = f->frequency; | 1844 | btv->freq = f->frequency; |
@@ -3865,7 +3854,7 @@ static int __devinit bttv_probe(struct pci_dev *dev, | |||
3865 | btv->c.nr); | 3854 | btv->c.nr); |
3866 | return -EIO; | 3855 | return -EIO; |
3867 | } | 3856 | } |
3868 | if (pci_set_dma_mask(dev, 0xffffffff)) { | 3857 | if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) { |
3869 | printk(KERN_WARNING "bttv%d: No suitable DMA available.\n", | 3858 | printk(KERN_WARNING "bttv%d: No suitable DMA available.\n", |
3870 | btv->c.nr); | 3859 | btv->c.nr); |
3871 | return -EIO; | 3860 | return -EIO; |