From 203652192634c1fce5e79df0a8ff2fabfaefd3ab Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 1 Jun 2010 22:53:07 +0200 Subject: tty: untangle locking of wait_until_sent Some wait_until_sent versions require the big tty mutex, others don't and some callers of wait_until_sent already hold it while other don't. That leads to recursive use of the BTM in these functions, which we're trying to get rid of. This turns all cleans up the locking there so that the driver's wait_until_sent function never takes the BTM itself if it is already called with that lock held. Signed-off-by: Arnd Bergmann Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/serial/crisv10.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/serial/crisv10.c') diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 94bfb9f238e1..8e356c5eeae0 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c @@ -3935,7 +3935,6 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout) * Check R_DMA_CHx_STATUS bit 0-6=number of available bytes in FIFO * R_DMA_CHx_HWSW bit 31-16=nbr of bytes left in DMA buffer (0=64k) */ - tty_lock_nested(); /* locked already when coming from close */ orig_jiffies = jiffies; while (info->xmit.head != info->xmit.tail || /* More in send queue */ (*info->ostatusadr & 0x007f) || /* more in FIFO */ @@ -3952,7 +3951,6 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout) curr_time_usec - info->last_tx_active_usec; } set_current_state(TASK_RUNNING); - tty_unlock(); } /* -- cgit v1.2.1