TTY: tty_buffer, cache pointer to tty->buf
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Oct 2012 20:26:45 +0000 (22:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 23:53:21 +0000 (16:53 -0700)
commit5cff39c69b57df6d7bf4e87f2963571aa4ea6336
tree98707dcc865ad2b1ac97751ea83d8f0c35a176e7
parent2fc20661e3171d45e8e58a61eb5c6b7d8d614fde
TTY: tty_buffer, cache pointer to tty->buf

During the move of tty buffers from tty_struct to tty_port, we will
need to switch all users of buf to tty->port->buf. There are many
functions where this is accessed directly in their code many times.
Cache the tty->buf pointer in such functions now and change only
single lines in each function in the next patch.

Not that it is convenient for the next patch, but the code is now also
more readable.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_buffer.c