n_tty: Remove read_cnt
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 15 Jun 2013 13:14:22 +0000 (09:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:43:00 +0000 (16:43 -0700)
commita2f73be8ee36e48f11f89ab705beb3c587a2f320
tree1612dd60ae378dfb1369001c2eed60265797f1c0
parentbc5a5e3f45d047844830233fb95b19a95c864a0f
n_tty: Remove read_cnt

Storing the read_cnt creates an unnecessary shared variable
between the single-producer (n_tty_receive_buf()) and the
single-consumer (n_tty_read()).

Compute read_cnt from head & tail instead of storing.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c