patch-2.3.1 linux/drivers/char/radio-cadet.c
Next file: linux/drivers/char/random.c
Previous file: linux/drivers/char/qpmouse.c
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Wed May 12 13:27:37 1999
- Orig file:
v2.3.0/linux/drivers/char/radio-cadet.c
- Orig date:
Mon May 10 13:00:10 1999
diff -u --recursive --new-file v2.3.0/linux/drivers/char/radio-cadet.c linux/drivers/char/radio-cadet.c
@@ -34,7 +34,7 @@
static int curtuner=0;
static int tunestat=0;
static int sigstrength=0;
-struct wait_queue *tunerq,*rdsq,*readq;
+static wait_queue_head_t tunerq,rdsq,readq;
struct timer_list tunertimer,rdstimer,readtimer;
static __u8 rdsin=0,rdsout=0,rdsstat=0;
static unsigned char rdsbuf[RDS_BUFFER];
@@ -75,7 +75,7 @@
rdstimer.function=cadet_wake;
rdstimer.data=(unsigned long)1;
rdstimer.expires=jiffies+(HZ/10);
- rdsq=NULL;
+ init_waitqueue_head(&rdsq);
add_timer(&rdstimer);
sleep_on(&rdsq);
@@ -260,7 +260,7 @@
tunertimer.function=cadet_wake;
tunertimer.data=(unsigned long)0;
tunertimer.expires=jiffies+(HZ/10);
- tunerq=NULL;
+ init_waitqueue_head(&tunerq);
add_timer(&tunertimer);
sleep_on(&tunerq);
cadet_gettune();
@@ -327,7 +327,7 @@
/*
* Service pending read
*/
- if((rdsin!=rdsout)&&(readq!=NULL)) {
+ if( rdsin!=rdsout) {
wake_up_interruptible(&readq);
}
@@ -369,7 +369,6 @@
return -EWOULDBLOCK;
}
interruptible_sleep_on(&readq);
- readq=NULL;
}
while((i<count)&&(rdsin!=rdsout)) {
readbuf[i++]=rdsbuf[rdsout++];
@@ -517,7 +516,7 @@
return -EBUSY;
users++;
MOD_INC_USE_COUNT;
- readq=NULL;
+ init_waitqueue_head(&readq);
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)