tty: tty_port: rename 'disc' to 'ld'
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Thu, 10 Aug 2023 09:14:40 +0000 (11:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 19:12:44 +0000 (21:12 +0200)
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>
drivers/tty/tty_port.c

index a788a6bf487d93cf80e0549a53f303530ad673b4..cda33dec73c31a8f6cbaa07592c8cdeb5ba3a749 100644 (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)