Messages in this thread Patch in this message | | | Date | Sun, 20 Jun 1999 22:04:11 -0400 (EDT) | From | "Frederick F. Gleason" <> | Subject | [patch] RDS Bugfix for ADS Cadet AM/FM Radio Card |
| |
The following patch fixes a bug in the ADS Cadet AM/FM Radio Card that causes the first twelve bytes of a read() after an open() to be garbage.
The patch applies cleanly to both 2.2.10 and 2.3.6.
-- patch begins -- diff -u --recursive --new-file linux-2.2.10/drivers/char/radio-cadet.c linux/drivers/char/radio-cadet.c --- linux-2.2.10/drivers/char/radio-cadet.c Mon Jun 7 19:18:17 1999 +++ linux/drivers/char/radio-cadet.c Sun Jun 20 21:32:36 1999 @@ -1,7 +1,7 @@ -/* cadet.c - A video4linux driver for the ADS Cadet AM/FM Radio Card +/* radio-cadet.c - A video4linux driver for the ADS Cadet AM/FM Radio Card * * by Fred Gleason <fredg@wava.com> - * Version 0.3.2 + * Version 0.3.3 * * (Loosely) based on code for the Aztech radio card by * @@ -346,17 +346,13 @@ static long cadet_read(struct video_device *v,char *buf,unsigned long count, int nonblock) { - int i=0,c; + int i=0; unsigned char readbuf[RDS_BUFFER]; if(rdsstat==0) { cadet_lock++; rdsstat=1; outb(0x80,io); /* Select RDS fifo */ - c=3*(inb(io)&0x03); - for(i=0;i<c;i++) { /* Flush the fifo */ - inb(io+1); - } cadet_lock--; init_timer(&readtimer); readtimer.function=cadet_handler; -- patch ends --
|-------------------------------------------------------------------------| |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| |-------------------------------------------------------------------------|
- 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/
| |