X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fradio%2Fradio-zoltrix.c;h=7bf1a4264891deca514dd6a5465497b46e02919d;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=59b86a6b4b0e745a008276ede9a2a1d50e30e260;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c index 59b86a6b4..7bf1a4264 100644 --- a/drivers/media/radio/radio-zoltrix.c +++ b/drivers/media/radio/radio-zoltrix.c @@ -1,7 +1,7 @@ /* zoltrix radio plus driver for Linux radio support * (c) 1998 C. van Schaik * - * BUGS + * BUGS * Due to the inconsistency in reading from the signal flags * it is difficult to get an accurate tuned signal. * @@ -14,7 +14,7 @@ * * 1999-05-06 - (C. van Schaik) * - Make signal strength and stereo scans - * kinder to cpu while in delay + * kinder to cpu while in delay * 1999-01-05 - (C. van Schaik) * - Changed tuning to 1/160Mhz accuracy * - Added stereo support @@ -33,7 +33,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include /* CONFIG_RADIO_ZOLTRIX_PORT */ #ifndef CONFIG_RADIO_ZOLTRIX_PORT @@ -106,7 +105,7 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq) i = 45; mutex_lock(&dev->lock); - + outb(0, io); outb(0, io); inb(io + 3); /* Zoltrix needs to be read to confirm */ @@ -140,8 +139,8 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq) udelay(1000); inb(io+2); - udelay(1000); - + udelay(1000); + if (dev->muted) { outb(0, io); @@ -149,12 +148,12 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq) inb(io + 3); udelay(1000); } - + mutex_unlock(&dev->lock); - + if(!dev->muted) { - zol_setvol(dev, dev->curvol); + zol_setvol(dev, dev->curvol); } return 0; } @@ -175,14 +174,14 @@ static int zol_getsigstr(struct zol_device *dev) b = inb(io); mutex_unlock(&dev->lock); - + if (a != b) return (0); - if ((a == 0xcf) || (a == 0xdf) /* I found this out by playing */ + if ((a == 0xcf) || (a == 0xdf) /* I found this out by playing */ || (a == 0xef)) /* with a binary scanner on the card io */ return (1); - return (0); + return (0); } static int zol_is_stereo (struct zol_device *dev) @@ -190,7 +189,7 @@ static int zol_is_stereo (struct zol_device *dev) int x1, x2; mutex_lock(&dev->lock); - + outb(0x00, io); outb(dev->curvol, io); msleep(20); @@ -200,7 +199,7 @@ static int zol_is_stereo (struct zol_device *dev) x2 = inb(io); mutex_unlock(&dev->lock); - + if ((x1 == x2) && (x1 == 0xcf)) return 1; return 0; @@ -227,7 +226,7 @@ static int zol_do_ioctl(struct inode *inode, struct file *file, case VIDIOCGTUNER: { struct video_tuner *v = arg; - if (v->tuner) + if (v->tuner) return -EINVAL; strcpy(v->name, "FM"); v->rangelow = (int) (88.0 * 16000); @@ -352,7 +351,7 @@ static int __init zoltrix_init(void) printk(KERN_INFO "Zoltrix Radio Plus card driver.\n"); mutex_init(&zoltrix_unit.lock); - + /* mute card - prevents noisy bootups */ /* this ensures that the volume is all the way down */