patch-2.3.1 linux/drivers/char/synclink.c
Next file: linux/drivers/char/tpqic02.c
Previous file: linux/drivers/char/specialix_io8.h
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Wed May 12 13:27:37 1999
- Orig file:
v2.3.0/linux/drivers/char/synclink.c
- Orig date:
Sun Mar 28 10:31:31 1999
diff -u --recursive --new-file v2.3.0/linux/drivers/char/synclink.c linux/drivers/char/synclink.c
@@ -241,11 +241,11 @@
int xmit_tail;
int xmit_cnt;
- struct wait_queue *open_wait;
- struct wait_queue *close_wait;
+ wait_queue_head_t open_wait;
+ wait_queue_head_t close_wait;
- struct wait_queue *status_event_wait_q;
- struct wait_queue *event_wait_q;
+ wait_queue_head_t status_event_wait_q;
+ wait_queue_head_t event_wait_q;
struct timer_list tx_timer; /* HDLC transmit timeout timer */
struct mgsl_struct *next_device; /* device list link */
@@ -904,7 +904,7 @@
* memory if large numbers of serial ports are open.
*/
static unsigned char *tmp_buf;
-static struct semaphore tmp_buf_sem = MUTEX;
+static DECLARE_MUTEX(tmp_buf_sem);
static inline int mgsl_paranoia_check(struct mgsl_struct *info,
kdev_t device, const char *routine)
@@ -2724,7 +2724,7 @@
if (mask & (MgslEvent_ExitHuntMode + MgslEvent_IdleReceived)) {
spin_lock_irqsave(&info->irq_spinlock,flags);
- if (!info->event_wait_q) {
+ if (!waitqueue_active(&info->event_wait_q)) {
/* disable enable exit hunt mode/idle rcvd IRQs */
regval = usc_InReg(info,RICR);
usc_OutReg(info, RICR, regval &
@@ -3295,7 +3295,7 @@
static int block_til_ready(struct tty_struct *tty, struct file * filp,
struct mgsl_struct *info)
{
- struct wait_queue wait = { current, NULL };
+ DECLARE_WAITQUEUE(wait, current);
int retval;
int do_clocal = 0, extra_count = 0;
unsigned long flags;
@@ -4152,6 +4152,10 @@
info->max_frame_size = 4096;
info->close_delay = 5*HZ/10;
info->closing_wait = 30*HZ;
+ init_waitqueue_head(&info->open_wait);
+ init_waitqueue_head(&info->close_wait);
+ init_waitqueue_head(&info->status_event_wait_q);
+ init_waitqueue_head(&info->event_wait_q);
memcpy(&info->params,&default_params,sizeof(MGSL_PARAMS));
info->idle_mode = HDLC_TXIDLE_FLAGS;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)