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>
This commit is contained in:
Jiri Slaby (SUSE) 2023-08-10 11:14:40 +02:00 committed by Greg Kroah-Hartman
parent af81533655
commit c6e37fe044

View File

@ -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)