OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
069f38b
)
tty: buffers: Move hidden buffer index advance into outer loop
author
Peter Hurley
<peter@hurleysoftware.com>
Mon, 13 Jul 2015 00:50:50 +0000
(20:50 -0400)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 24 Jul 2015 01:23:56 +0000
(18:23 -0700)
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>
drivers/tty/tty_buffer.c
patch
|
blob
|
history
diff --git
a/drivers/tty/tty_buffer.c
b/drivers/tty/tty_buffer.c
index
25ba5af
..
5a3fa89
100644
(file)
--- 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);