summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_buffer.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-07-13 00:50:50 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-24 01:23:56 (GMT)
commitaf5554f957f8a7e28b9826a9c4ad2a7dedd15a78 (patch)
tree0c6e36f1395a5d1507d040e6e454656522a692db /drivers/tty/tty_buffer.c
parent069f38b4983efaea92cbe7cc0cacc057af55739a (diff)
downloadlinux-af5554f957f8a7e28b9826a9c4ad2a7dedd15a78.tar.xz
tty: buffers: Move hidden buffer index advance into outer loop
The advance of the 'read' buffer index belongs in the outer flip buffer consume loop, with the other buffer index arithmetic. No functional change. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r--drivers/tty/tty_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 25ba5af..5a3fa89 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -444,7 +444,6 @@ receive_buf(struct tty_struct *tty, struct tty_buffer *head, int count)
if (count)
disc->ops->receive_buf(tty, p, f, count);
}
- head->read += count;
return count;
}
@@ -506,6 +505,7 @@ static void flush_to_ldisc(struct work_struct *work)
count = receive_buf(tty, head, count);
if (!count)
break;
+ head->read += count;
}
mutex_unlock(&buf->lock);