]> git.baikalelectronics.ru Git - kernel.git/commit
tty: new helper function tty_get_icount()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Dec 2020 10:42:45 +0000 (11:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Dec 2020 15:09:29 +0000 (16:09 +0100)
commitb5ab34eb5a5b7d509f262b6487672dc7d942b946
tree270faad5649dc628f233a805f3f155a25604bdd3
parent31c64d3ccee1ea604f042faf8bf3c8e9e7702629
tty: new helper function tty_get_icount()

For a given struct tty_struct this yields the corresponding statistics
about sent and received characters (and some more) which is needed to
implement an LED trigger for tty devices.

The new function is then used to simplify tty_tiocgicount().

Reviewed-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20201218104246.591315-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c
include/linux/tty.h