aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/esp.c
diff options
context:
space:
mode:
authorPaul Fulghum <paulkf@microgate.com>2006-02-03 06:04:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-03 11:32:09 -0500
commit808249ceba49cdb3054c0aa5b75a61862d6cab94 (patch)
tree246d11a687db3e8a775e746ed8f0da1aeedae70c /drivers/char/esp.c
parent546cfdf47f2ea2438b01f8626a60b87f9d8d1e53 (diff)
[PATCH] new tty buffering locking fix
Change locking in the new tty buffering facility from using tty->read_lock, which is currently ignored by drivers and thus ineffective. New locking uses a new tty buffering specific lock enforced centrally in the tty buffering code. Two drivers (esp and cyclades) are updated to use the tty buffering functions instead of accessing tty buffering internals directly. This is required for the new locking to work. Minor checks for NULL buffers added to tty_prepare_flip_string/tty_prepare_flip_string_flags Signed-off-by: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/esp.c')
-rw-r--r--drivers/char/esp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 3f3ac039f4d9..57539d8f9f7c 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -359,7 +359,7 @@ static inline void receive_chars_pio(struct esp_struct *info, int num_bytes)
359 } 359 }
360 } 360 }
361 361
362 schedule_delayed_work(&tty->buf.work, 1); 362 tty_schedule_flip(tty);
363 363
364 info->stat_flags &= ~ESP_STAT_RX_TIMEOUT; 364 info->stat_flags &= ~ESP_STAT_RX_TIMEOUT;
365 release_pio_buffer(pio_buf); 365 release_pio_buffer(pio_buf);
@@ -426,7 +426,7 @@ static inline void receive_chars_dma_done(struct esp_struct *info,
426 } 426 }
427 tty_insert_flip_char(tty, dma_buffer[num_bytes - 1], statflag); 427 tty_insert_flip_char(tty, dma_buffer[num_bytes - 1], statflag);
428 } 428 }
429 schedule_delayed_work(&tty->buf.work, 1); 429 tty_schedule_flip(tty);
430 } 430 }
431 431
432 if (dma_bytes != num_bytes) { 432 if (dma_bytes != num_bytes) {