patch-2.3.1 linux/drivers/char/random.c

Next file: linux/drivers/char/riscom8.c
Previous file: linux/drivers/char/radio-cadet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.0/linux/drivers/char/random.c linux/drivers/char/random.c
@@ -424,8 +424,8 @@
 static struct timer_rand_state extract_timer_state;
 static struct timer_rand_state *irq_timer_state[NR_IRQS];
 static struct timer_rand_state *blkdev_timer_state[MAX_BLKDEV];
-static struct wait_queue *random_read_wait;
-static struct wait_queue *random_write_wait;
+static DECLARE_WAIT_QUEUE_HEAD(random_read_wait);
+static DECLARE_WAIT_QUEUE_HEAD(random_write_wait);
 
 static ssize_t random_read(struct file * file, char * buf,
 			   size_t nbytes, loff_t *ppos);
@@ -555,8 +555,6 @@
 	initialize_benchmark(&timer_benchmark, "timer", 0);
 #endif
 	extract_timer_state.dont_count_entropy = 1;
-	random_read_wait = NULL;
-	random_write_wait = NULL;
 }
 
 void rand_initialize_irq(int irq)
@@ -1303,7 +1301,7 @@
 static ssize_t
 random_read(struct file * file, char * buf, size_t nbytes, loff_t *ppos)
 {
-	struct wait_queue 	wait = { current, NULL };
+	DECLARE_WAITQUEUE(wait, current);
 	ssize_t			n, retval = 0, count = 0;
 	
 	if (nbytes == 0)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)