diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-01-03 09:53:05 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 01:23:16 -0500 |
commit | d6c53c0e9bd0a83f9f9ddbc9fd80141a54d83896 (patch) | |
tree | 2b749451607e0a52d97d61af984e7aa2e3818067 /drivers/tty/tty_buffer.c | |
parent | 05c7cd39907184328f48d3e7899f9cdd653ad336 (diff) |
TTY: move low_latency to tty_port
One point is to have less places where we actually need tty pointer.
The other is that low_latency is bound to buffer processing and
buffers are now in tty_port. So it makes sense to move low_latency to
tty_port too.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r-- | drivers/tty/tty_buffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 31873e42602a..1bfe97a8e2eb 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c | |||
@@ -364,7 +364,7 @@ void tty_schedule_flip(struct tty_struct *tty) | |||
364 | { | 364 | { |
365 | struct tty_bufhead *buf = &tty->port->buf; | 365 | struct tty_bufhead *buf = &tty->port->buf; |
366 | unsigned long flags; | 366 | unsigned long flags; |
367 | WARN_ON(tty->low_latency); | 367 | WARN_ON(tty->port->low_latency); |
368 | 368 | ||
369 | spin_lock_irqsave(&buf->lock, flags); | 369 | spin_lock_irqsave(&buf->lock, flags); |
370 | if (buf->tail != NULL) | 370 | if (buf->tail != NULL) |
@@ -538,7 +538,7 @@ static void flush_to_ldisc(struct work_struct *work) | |||
538 | */ | 538 | */ |
539 | void tty_flush_to_ldisc(struct tty_struct *tty) | 539 | void tty_flush_to_ldisc(struct tty_struct *tty) |
540 | { | 540 | { |
541 | if (!tty->low_latency) | 541 | if (!tty->port->low_latency) |
542 | flush_work(&tty->port->buf.work); | 542 | flush_work(&tty->port->buf.work); |
543 | } | 543 | } |
544 | 544 | ||
@@ -547,7 +547,8 @@ void tty_flush_to_ldisc(struct tty_struct *tty) | |||
547 | * @tty: tty to push | 547 | * @tty: tty to push |
548 | * | 548 | * |
549 | * Queue a push of the terminal flip buffers to the line discipline. This | 549 | * Queue a push of the terminal flip buffers to the line discipline. This |
550 | * function must not be called from IRQ context if tty->low_latency is set. | 550 | * function must not be called from IRQ context if port->low_latency is |
551 | * set. | ||
551 | * | 552 | * |
552 | * In the event of the queue being busy for flipping the work will be | 553 | * In the event of the queue being busy for flipping the work will be |
553 | * held off and retried later. | 554 | * held off and retried later. |
@@ -565,7 +566,7 @@ void tty_flip_buffer_push(struct tty_struct *tty) | |||
565 | buf->tail->commit = buf->tail->used; | 566 | buf->tail->commit = buf->tail->used; |
566 | spin_unlock_irqrestore(&buf->lock, flags); | 567 | spin_unlock_irqrestore(&buf->lock, flags); |
567 | 568 | ||
568 | if (tty->low_latency) | 569 | if (tty->port->low_latency) |
569 | flush_to_ldisc(&buf->work); | 570 | flush_to_ldisc(&buf->work); |
570 | else | 571 | else |
571 | schedule_work(&buf->work); | 572 | schedule_work(&buf->work); |