[patch] Fix for ADS Cadet Radio Driver

Frederick F. Gleason (fredg@wava.com)
Wed, 2 Jun 1999 22:22:52 -0400 (EDT)


The following patch fixes a buglet in the ADS Cadet radio driver that
prevents the card from being detected in certain PnP configurations.
(Applies cleanly to both 2.2.9 and 2.3.4).

|-------------------------------------------------------------------------|
|Frederick F. Gleason, Jr.|WAVA Radio - 105 FM |Voice: 1-(703)-807-2266 |
| Chief Engineer |1901 N. Moore Street| FAX: 1-(703)-807-2248 |
| |Arlington, VA 22209 | Web: HTTP://www.wava.com|
|-------------------------------------------------------------------------|

-- patch begins --
diff -u --recursive --new-file linux-2.2.9/drivers/char/radio-cadet.c linux/drivers/char/radio-cadet.c
--- linux-2.2.9/drivers/char/radio-cadet.c Mon May 10 16:00:10 1999
+++ linux/drivers/char/radio-cadet.c Mon May 31 21:45:07 1999
@@ -1,7 +1,7 @@
/* cadet.c - A video4linux driver for the ADS Cadet AM/FM Radio Card
*
* by Fred Gleason <fredg@wava.com>
- * Version 0.3.1
+ * Version 0.3.2
*
* (Loosely) based on code for the Aztech radio card by
*
@@ -558,7 +558,7 @@
return -EINVAL;

request_region(io,2,"cadet");
- printk(KERN_INFO "ADS Cadet Radio Card at %x\n",io);
+ printk(KERN_INFO "ADS Cadet Radio Card at 0x%x\n",io);
return 0;
}

@@ -571,12 +571,11 @@

for(i=0;i<8;i++) {
io=iovals[i];
- if(check_region(io,2)) {
- return -1;
- }
- cadet_setfreq(1410);
- if(cadet_getfreq()==1410) {
- return io;
+ if(check_region(io,2)>=0) {
+ cadet_setfreq(1410);
+ if(cadet_getfreq()==1410) {
+ return io;
+ }
}
}
return -1;
-- patch ends --

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/