Commit 5701cb8b authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman
Browse files

tty: Call ->dtr_rts() parameter active consistently



Convert various parameter names for ->dtr_rts() and related functions
from onoff, on, and raise to active.

Reviewed-by: default avatarJiri Slaby <jirislaby@kernel.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230117090358.4796-12-ilpo.jarvinen@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 87f22db4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ static void async_mode(MGSLPC_INFO *info);
static void tx_timeout(struct timer_list *t);

static bool carrier_raised(struct tty_port *port);
static void dtr_rts(struct tty_port *port, bool onoff);
static void dtr_rts(struct tty_port *port, bool active);

#if SYNCLINK_GENERIC_HDLC
#define dev_to_port(D) (dev_to_hdlc(D)->priv)
@@ -2442,13 +2442,13 @@ static bool carrier_raised(struct tty_port *port)
	return info->serial_signals & SerialSignal_DCD;
}

static void dtr_rts(struct tty_port *port, bool onoff)
static void dtr_rts(struct tty_port *port, bool active)
{
	MGSLPC_INFO *info = container_of(port, MGSLPC_INFO, port);
	unsigned long flags;

	spin_lock_irqsave(&info->lock, flags);
	if (onoff)
	if (active)
		info->serial_signals |= SerialSignal_RTS | SerialSignal_DTR;
	else
		info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR);
+3 −3
Original line number Diff line number Diff line
@@ -542,20 +542,20 @@ static bool uart_carrier_raised(struct tty_port *tport)
/**
 *	uart_dtr_rts		-	 port helper to set uart signals
 *	@tport: tty port to be updated
 *	@onoff: set to turn on DTR/RTS
 *	@active: set to turn on DTR/RTS
 *
 *	Called by the tty port helpers when the modem signals need to be
 *	adjusted during an open, close and hangup.
 */

static void uart_dtr_rts(struct tty_port *tport, bool onoff)
static void uart_dtr_rts(struct tty_port *tport, bool active)
{
	struct sdio_uart_port *port =
			container_of(tport, struct sdio_uart_port, port);
	int ret = sdio_uart_claim_func(port);
	if (ret)
		return;
	if (!onoff)
	if (!active)
		sdio_uart_clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
	else
		sdio_uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
+2 −2
Original line number Diff line number Diff line
@@ -701,7 +701,7 @@ static int gb_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
	return -ENOIOCTLCMD;
}

static void gb_tty_dtr_rts(struct tty_port *port, bool on)
static void gb_tty_dtr_rts(struct tty_port *port, bool active)
{
	struct gb_tty *gb_tty;
	u8 newctrl;
@@ -709,7 +709,7 @@ static void gb_tty_dtr_rts(struct tty_port *port, bool on)
	gb_tty = container_of(port, struct gb_tty, port);
	newctrl = gb_tty->ctrlout;

	if (on)
	if (active)
		newctrl |= (GB_UART_CTRL_DTR | GB_UART_CTRL_RTS);
	else
		newctrl &= ~(GB_UART_CTRL_DTR | GB_UART_CTRL_RTS);
+2 −2
Original line number Diff line number Diff line
@@ -1459,13 +1459,13 @@ static bool amiga_carrier_raised(struct tty_port *port)
	return !(ciab.pra & SER_DCD);
}

static void amiga_dtr_rts(struct tty_port *port, bool raise)
static void amiga_dtr_rts(struct tty_port *port, bool active)
{
	struct serial_state *info = container_of(port, struct serial_state,
			tport);
	unsigned long flags;

	if (raise)
	if (active)
		info->MCR |= SER_DTR|SER_RTS;
	else
		info->MCR &= ~(SER_DTR|SER_RTS);
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ struct hv_ops {
	int (*tiocmset)(struct hvc_struct *hp, unsigned int set, unsigned int clear);

	/* Callbacks to handle tty ports */
	void (*dtr_rts)(struct hvc_struct *hp, bool raise);
	void (*dtr_rts)(struct hvc_struct *hp, bool active);
};

/* Register a vterm and a slot index for use as a console (console_init) */
Loading