diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-08-10 12:14:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 22:12:44 +0300 |
commit | c6e37fe04433684cadb99aa472b2959d500c5898 (patch) | |
tree | ac9a5cd7de476f08ecd18aeb6225e96401d14eb5 /drivers/tty/tty_port.c | |
parent | af815336556df28f800669c58ab3bdad7d786b98 (diff) | |
download | linux-c6e37fe04433684cadb99aa472b2959d500c5898.tar.xz |
tty: tty_port: rename 'disc' to 'ld'
Line discipline variables are named 'ld' all over the tty code. Rename
these in tty_port, so that it is easier to grep for the code (namely for
"ld->ops").
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-7-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_port.c')
-rw-r--r-- | drivers/tty/tty_port.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index a788a6bf487d..cda33dec73c3 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c @@ -26,19 +26,19 @@ static int tty_port_default_receive_buf(struct tty_port *port, { int ret; struct tty_struct *tty; - struct tty_ldisc *disc; + struct tty_ldisc *ld; tty = READ_ONCE(port->itty); if (!tty) return 0; - disc = tty_ldisc_ref(tty); - if (!disc) + ld = tty_ldisc_ref(tty); + if (!ld) return 0; - ret = tty_ldisc_receive_buf(disc, p, (char *)f, count); + ret = tty_ldisc_receive_buf(ld, p, (char *)f, count); - tty_ldisc_deref(disc); + tty_ldisc_deref(ld); return ret; } @@ -47,20 +47,20 @@ static void tty_port_default_lookahead_buf(struct tty_port *port, const unsigned const unsigned char *f, unsigned int count) { struct tty_struct *tty; - struct tty_ldisc *disc; + struct tty_ldisc *ld; tty = READ_ONCE(port->itty); if (!tty) return; - disc = tty_ldisc_ref(tty); - if (!disc) + ld = tty_ldisc_ref(tty); + if (!ld) return; - if (disc->ops->lookahead_buf) - disc->ops->lookahead_buf(disc->tty, p, f, count); + if (ld->ops->lookahead_buf) + ld->ops->lookahead_buf(ld->tty, p, f, count); - tty_ldisc_deref(disc); + tty_ldisc_deref(ld); } static void tty_port_default_wakeup(struct tty_port *port) |