From d29f3ef39be4eec0362b985305fc526d9be318cf Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 3 May 2012 22:24:08 +0100 Subject: tty_lock: Localise the lock In each remaining case the tty_lock is associated with a specific tty. This means we can now lock on a per tty basis. We do need tty_lock_pair() for the pty case. Uglier but still a step in the right direction. [fixed up calls in 3 missing drivers - gregkh] Signed-off-by: Alan Cox Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/serial/68360serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/staging') diff --git a/drivers/staging/serial/68360serial.c b/drivers/staging/serial/68360serial.c index daf0b1d0dc28..23ee50e25e44 100644 --- a/drivers/staging/serial/68360serial.c +++ b/drivers/staging/serial/68360serial.c @@ -1859,9 +1859,9 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, printk("block_til_ready blocking: ttys%d, count = %d\n", info->line, state->count); #endif - tty_unlock(); + tty_unlock(tty); schedule(); - tty_lock(); + tty_lock(tty); } current->state = TASK_RUNNING; remove_wait_queue(&info->open_wait, &wait); -- cgit v1.2.3-59-g8ed1b