diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-06-01 16:53:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 16:47:43 -0400 |
commit | ec79d6056de58511d8e46d9ae59d3878f958dc3e (patch) | |
tree | 8e73cf399c4cb3c31dbf3caced385cfc018a706a /drivers/serial/crisv10.c | |
parent | 3f582b8c11014e4ce310d9839fb335164195333f (diff) |
tty: replace BKL with a new tty_lock
As a preparation for replacing the big kernel lock
in the TTY layer, wrap all the callers in new
macros tty_lock, tty_lock_nested and tty_unlock.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial/crisv10.c')
-rw-r--r-- | drivers/serial/crisv10.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 30626440a062..f848e188deae 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c | |||
@@ -3935,7 +3935,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout) | |||
3935 | * Check R_DMA_CHx_STATUS bit 0-6=number of available bytes in FIFO | 3935 | * Check R_DMA_CHx_STATUS bit 0-6=number of available bytes in FIFO |
3936 | * R_DMA_CHx_HWSW bit 31-16=nbr of bytes left in DMA buffer (0=64k) | 3936 | * R_DMA_CHx_HWSW bit 31-16=nbr of bytes left in DMA buffer (0=64k) |
3937 | */ | 3937 | */ |
3938 | lock_kernel(); | 3938 | tty_lock_nested(); /* locked already when coming from close */ |
3939 | orig_jiffies = jiffies; | 3939 | orig_jiffies = jiffies; |
3940 | while (info->xmit.head != info->xmit.tail || /* More in send queue */ | 3940 | while (info->xmit.head != info->xmit.tail || /* More in send queue */ |
3941 | (*info->ostatusadr & 0x007f) || /* more in FIFO */ | 3941 | (*info->ostatusadr & 0x007f) || /* more in FIFO */ |
@@ -3952,7 +3952,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout) | |||
3952 | curr_time_usec - info->last_tx_active_usec; | 3952 | curr_time_usec - info->last_tx_active_usec; |
3953 | } | 3953 | } |
3954 | set_current_state(TASK_RUNNING); | 3954 | set_current_state(TASK_RUNNING); |
3955 | unlock_kernel(); | 3955 | tty_unlock(); |
3956 | } | 3956 | } |
3957 | 3957 | ||
3958 | /* | 3958 | /* |