aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_buffer.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-04-26 04:22:15 -0400
committerJiri Kosina <jkosina@suse.cz>2011-04-26 04:22:59 -0400
commit07f9479a40cc778bc1462ada11f95b01360ae4ff (patch)
tree0676cf38df3844004bb3ebfd99dfa67a4a8998f5 /drivers/tty/tty_buffer.c
parent9d5e6bdb3013acfb311ab407eeca0b6a6a3dedbf (diff)
parentcd2e49e90f1cae7726c9a2c54488d881d7f1cd1c (diff)
Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be applied for files that didn't exist on the old branch.
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r--drivers/tty/tty_buffer.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index d8210ca0072..f1a7918d71a 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -322,7 +322,7 @@ void tty_schedule_flip(struct tty_struct *tty)
322 if (tty->buf.tail != NULL) 322 if (tty->buf.tail != NULL)
323 tty->buf.tail->commit = tty->buf.tail->used; 323 tty->buf.tail->commit = tty->buf.tail->used;
324 spin_unlock_irqrestore(&tty->buf.lock, flags); 324 spin_unlock_irqrestore(&tty->buf.lock, flags);
325 schedule_delayed_work(&tty->buf.work, 1); 325 schedule_work(&tty->buf.work);
326} 326}
327EXPORT_SYMBOL(tty_schedule_flip); 327EXPORT_SYMBOL(tty_schedule_flip);
328 328
@@ -402,7 +402,7 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string_flags);
402static void flush_to_ldisc(struct work_struct *work) 402static void flush_to_ldisc(struct work_struct *work)
403{ 403{
404 struct tty_struct *tty = 404 struct tty_struct *tty =
405 container_of(work, struct tty_struct, buf.work.work); 405 container_of(work, struct tty_struct, buf.work);
406 unsigned long flags; 406 unsigned long flags;
407 struct tty_ldisc *disc; 407 struct tty_ldisc *disc;
408 408
@@ -442,10 +442,8 @@ static void flush_to_ldisc(struct work_struct *work)
442 line discipline as we want to empty the queue */ 442 line discipline as we want to empty the queue */
443 if (test_bit(TTY_FLUSHPENDING, &tty->flags)) 443 if (test_bit(TTY_FLUSHPENDING, &tty->flags))
444 break; 444 break;
445 if (!tty->receive_room || seen_tail) { 445 if (!tty->receive_room || seen_tail)
446 schedule_delayed_work(&tty->buf.work, 1);
447 break; 446 break;
448 }
449 if (count > tty->receive_room) 447 if (count > tty->receive_room)
450 count = tty->receive_room; 448 count = tty->receive_room;
451 char_buf = head->char_buf_ptr + head->read; 449 char_buf = head->char_buf_ptr + head->read;
@@ -481,7 +479,7 @@ static void flush_to_ldisc(struct work_struct *work)
481 */ 479 */
482void tty_flush_to_ldisc(struct tty_struct *tty) 480void tty_flush_to_ldisc(struct tty_struct *tty)
483{ 481{
484 flush_delayed_work(&tty->buf.work); 482 flush_work(&tty->buf.work);
485} 483}
486 484
487/** 485/**
@@ -506,9 +504,9 @@ void tty_flip_buffer_push(struct tty_struct *tty)
506 spin_unlock_irqrestore(&tty->buf.lock, flags); 504 spin_unlock_irqrestore(&tty->buf.lock, flags);
507 505
508 if (tty->low_latency) 506 if (tty->low_latency)
509 flush_to_ldisc(&tty->buf.work.work); 507 flush_to_ldisc(&tty->buf.work);
510 else 508 else
511 schedule_delayed_work(&tty->buf.work, 1); 509 schedule_work(&tty->buf.work);
512} 510}
513EXPORT_SYMBOL(tty_flip_buffer_push); 511EXPORT_SYMBOL(tty_flip_buffer_push);
514 512
@@ -529,6 +527,6 @@ void tty_buffer_init(struct tty_struct *tty)
529 tty->buf.tail = NULL; 527 tty->buf.tail = NULL;
530 tty->buf.free = NULL; 528 tty->buf.free = NULL;
531 tty->buf.memory_used = 0; 529 tty->buf.memory_used = 0;
532 INIT_DELAYED_WORK(&tty->buf.work, flush_to_ldisc); 530 INIT_WORK(&tty->buf.work, flush_to_ldisc);
533} 531}
534 532