Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: moxa: Rename dtr/rts parameters/variables to active

Use active consistently for naming parameters and variables.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230117090358.4796-13-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ilpo Järvinen and committed by
Greg Kroah-Hartman
2d762dab 5701cb8b

+26 -26
+26 -26
drivers/tty/moxa.c
··· 1443 1443 return dcd; 1444 1444 } 1445 1445 1446 - static void moxa_dtr_rts(struct tty_port *port, bool onoff) 1446 + static void moxa_dtr_rts(struct tty_port *port, bool active) 1447 1447 { 1448 1448 struct moxa_port *ch = container_of(port, struct moxa_port, port); 1449 - MoxaPortLineCtrl(ch, onoff, onoff); 1449 + MoxaPortLineCtrl(ch, active, active); 1450 1450 } 1451 1451 1452 1452 ··· 1557 1557 static int moxa_tiocmget(struct tty_struct *tty) 1558 1558 { 1559 1559 struct moxa_port *ch = tty->driver_data; 1560 - bool dtr, rts; 1560 + bool dtr_active, rts_active; 1561 1561 int flag = 0; 1562 1562 int status; 1563 1563 1564 - MoxaPortGetLineOut(ch, &dtr, &rts); 1565 - if (dtr) 1564 + MoxaPortGetLineOut(ch, &dtr_active, &rts_active); 1565 + if (dtr_active) 1566 1566 flag |= TIOCM_DTR; 1567 - if (rts) 1567 + if (rts_active) 1568 1568 flag |= TIOCM_RTS; 1569 1569 status = MoxaPortLineStatus(ch); 1570 1570 if (status & 1) ··· 1579 1579 static int moxa_tiocmset(struct tty_struct *tty, 1580 1580 unsigned int set, unsigned int clear) 1581 1581 { 1582 + bool dtr_active, rts_active; 1582 1583 struct moxa_port *ch; 1583 - bool dtr, rts; 1584 1584 1585 1585 mutex_lock(&moxa_openlock); 1586 1586 ch = tty->driver_data; ··· 1589 1589 return -EINVAL; 1590 1590 } 1591 1591 1592 - MoxaPortGetLineOut(ch, &dtr, &rts); 1592 + MoxaPortGetLineOut(ch, &dtr_active, &rts_active); 1593 1593 if (set & TIOCM_RTS) 1594 - rts = true; 1594 + rts_active = true; 1595 1595 if (set & TIOCM_DTR) 1596 - dtr = true; 1596 + dtr_active = true; 1597 1597 if (clear & TIOCM_RTS) 1598 - rts = false; 1598 + rts_active = false; 1599 1599 if (clear & TIOCM_DTR) 1600 - dtr = false; 1601 - MoxaPortLineCtrl(ch, dtr, rts); 1600 + dtr_active = false; 1601 + MoxaPortLineCtrl(ch, dtr_active, rts_active); 1602 1602 mutex_unlock(&moxa_openlock); 1603 1603 return 0; 1604 1604 } ··· 1881 1881 * Syntax: 1882 1882 * int MoxaPortGetLineOut(int port, bool *dtrState, bool *rtsState); 1883 1883 * int port : port number (0 - 127) 1884 - * bool * dtrState : pointer to bool to receive the current DTR 1884 + * bool * dtr_active : pointer to bool to receive the current DTR 1885 1885 * state. (if NULL, this function will not 1886 1886 * write to this address) 1887 - * bool * rtsState : pointer to bool to receive the current RTS 1887 + * bool * rts_active : pointer to bool to receive the current RTS 1888 1888 * state. (if NULL, this function will not 1889 1889 * write to this address) 1890 1890 * ··· 1896 1896 * Syntax: 1897 1897 * void MoxaPortLineCtrl(int port, bool dtrState, bool rtsState); 1898 1898 * int port : port number (0 - 127) 1899 - * bool dtrState : DTR output state 1900 - * bool rtsState : RTS output state 1899 + * bool dtr_active : DTR output state 1900 + * bool rts_active : RTS output state 1901 1901 * 1902 1902 * 1903 1903 * Function 15: Setting the flow control of this port. ··· 2105 2105 return baud; 2106 2106 } 2107 2107 2108 - static int MoxaPortGetLineOut(struct moxa_port *port, bool *dtrState, 2109 - bool *rtsState) 2108 + static int MoxaPortGetLineOut(struct moxa_port *port, bool *dtr_active, 2109 + bool *rts_active) 2110 2110 { 2111 - if (dtrState) 2112 - *dtrState = port->lineCtrl & DTR_ON; 2113 - if (rtsState) 2114 - *rtsState = port->lineCtrl & RTS_ON; 2111 + if (dtr_active) 2112 + *dtr_active = port->lineCtrl & DTR_ON; 2113 + if (rts_active) 2114 + *rts_active = port->lineCtrl & RTS_ON; 2115 2115 2116 2116 return 0; 2117 2117 } 2118 2118 2119 - static void MoxaPortLineCtrl(struct moxa_port *port, bool dtr, bool rts) 2119 + static void MoxaPortLineCtrl(struct moxa_port *port, bool dtr_active, bool rts_active) 2120 2120 { 2121 2121 u8 mode = 0; 2122 2122 2123 - if (dtr) 2123 + if (dtr_active) 2124 2124 mode |= DTR_ON; 2125 - if (rts) 2125 + if (rts_active) 2126 2126 mode |= RTS_ON; 2127 2127 port->lineCtrl = mode; 2128 2128 moxafunc(port->tableAddr, FC_LineControl, mode);