summaryrefslogtreecommitdiffstats
path: root/include/linux/tty_flip.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-06-15 09:36:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 16:47:07 -0700
commit1fc359fc3ea72314cc3ebdfa94c60e020c152cd2 (patch)
tree302ccb5a8cd9dee3c5affe1407e1413b66e8a207 /include/linux/tty_flip.h
parentf0f947c124e05ec977019b974b12dfe171dd7148 (diff)
downloadop-kernel-dev-1fc359fc3ea72314cc3ebdfa94c60e020c152cd2.zip
op-kernel-dev-1fc359fc3ea72314cc3ebdfa94c60e020c152cd2.tar.gz
tty: Compute flip buffer ptrs
The char_buf_ptr and flag_buf_ptr values are trivially derived from the .data field offset; compute values as needed. Fixes a long-standing type-mismatch with the char and flag ptrs. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty_flip.h')
-rw-r--r--include/linux/tty_flip.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index e0f2526..ad03039 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -18,8 +18,8 @@ static inline int tty_insert_flip_char(struct tty_port *port,
{
struct tty_buffer *tb = port->buf.tail;
if (tb && tb->used < tb->size) {
- tb->flag_buf_ptr[tb->used] = flag;
- tb->char_buf_ptr[tb->used++] = ch;
+ *flag_buf_ptr(tb, tb->used) = flag;
+ *char_buf_ptr(tb, tb->used++) = ch;
return 1;
}
return tty_insert_flip_string_flags(port, &ch, &flag, 1);
OpenPOWER on IntegriCloud