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

Next file: linux/drivers/char/rocket_int.h
Previous file: linux/drivers/char/riscom8.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.0/linux/drivers/char/rocket.c linux/drivers/char/rocket.c
@@ -253,7 +253,7 @@
  * memory if large numbers of serial ports are open.
  */
 static unsigned char *tmp_buf = 0;
-static struct semaphore tmp_buf_sem = MUTEX;
+static DECLARE_MUTEX(tmp_buf_sem);
 
 static void rp_start(struct tty_struct *tty);
 
@@ -643,6 +643,8 @@
 	info->close_delay = 50;
 	info->callout_termios =callout_driver.init_termios;
 	info->normal_termios = rocket_driver.init_termios;
+	init_waitqueue_head(&info->open_wait);
+	init_waitqueue_head(&info->close_wait);
 
 	info->intmask = RXF_TRIG | TXFIFO_MT | SRC_INT | DELTA_CD |
 		DELTA_CTS | DELTA_DSR;
@@ -807,7 +809,7 @@
 static int block_til_ready(struct tty_struct *tty, struct file * filp,
 			   struct r_port *info)
 {
-	struct wait_queue wait = { current, NULL };
+	DECLARE_WAITQUEUE(wait, current);
 	int		retval;
 	int		do_clocal = 0, extra_count = 0;
 	unsigned long	flags;

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