mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
USB: serial: digi_acceleport: clean up modem-control handling
Clean up modem-control handling somewhat by adding missing whitespace around operators and splitting a long statement in two. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
f64c3ab230
commit
a7f9f29058
@ -569,9 +569,9 @@ static int digi_set_modem_signals(struct usb_serial_port *port,
|
|||||||
ret = usb_submit_urb(oob_port->write_urb, GFP_ATOMIC);
|
ret = usb_submit_urb(oob_port->write_urb, GFP_ATOMIC);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
oob_priv->dp_write_urb_in_use = 1;
|
oob_priv->dp_write_urb_in_use = 1;
|
||||||
port_priv->dp_modem_signals =
|
port_priv->dp_modem_signals &= ~(TIOCM_DTR | TIOCM_RTS);
|
||||||
(port_priv->dp_modem_signals&~(TIOCM_DTR|TIOCM_RTS))
|
port_priv->dp_modem_signals |=
|
||||||
| (modem_signals&(TIOCM_DTR|TIOCM_RTS));
|
modem_signals & (TIOCM_DTR | TIOCM_RTS);
|
||||||
}
|
}
|
||||||
spin_unlock(&port_priv->dp_port_lock);
|
spin_unlock(&port_priv->dp_port_lock);
|
||||||
spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
|
spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
|
||||||
@ -1084,7 +1084,7 @@ static int digi_chars_in_buffer(struct tty_struct *tty)
|
|||||||
static void digi_dtr_rts(struct usb_serial_port *port, int on)
|
static void digi_dtr_rts(struct usb_serial_port *port, int on)
|
||||||
{
|
{
|
||||||
/* Adjust DTR and RTS */
|
/* Adjust DTR and RTS */
|
||||||
digi_set_modem_signals(port, on * (TIOCM_DTR|TIOCM_RTS), 1);
|
digi_set_modem_signals(port, on * (TIOCM_DTR | TIOCM_RTS), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int digi_open(struct tty_struct *tty, struct usb_serial_port *port)
|
static int digi_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||||
|
Loading…
Reference in New Issue
Block a user