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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4ea3cd65e0
commit
d20c219c73
@@ -500,6 +500,8 @@ extern void tty_unthrottle(struct tty_struct *tty);
|
||||
extern int tty_throttle_safe(struct tty_struct *tty);
|
||||
extern int tty_unthrottle_safe(struct tty_struct *tty);
|
||||
extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws);
|
||||
extern int tty_get_icount(struct tty_struct *tty,
|
||||
struct serial_icounter_struct *icount);
|
||||
extern int is_current_pgrp_orphaned(void);
|
||||
extern void tty_hangup(struct tty_struct *tty);
|
||||
extern void tty_vhangup(struct tty_struct *tty);
|
||||
|
||||
Reference in New Issue
Block a user