From: Johan Hovold <johan@kernel.org>
To: linux-usb@vger.kernel.org
Cc: Johan Hovold <johan@kernel.org>
Subject: [1/2] USB: serial: digi_acceleport: clean up modem-control handling
Date: Thu, 18 Apr 2019 18:20:19 +0200 [thread overview]
Message-ID: <20190418162020.23566-1-johan@kernel.org> (raw)
Clean up modem-control handling somewhat by adding missing whitespace
around operators and splitting a long statement in two.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/digi_acceleport.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index e7f244cf2c07..4699e114f617 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -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);
if (ret == 0) {
oob_priv->dp_write_urb_in_use = 1;
- port_priv->dp_modem_signals =
- (port_priv->dp_modem_signals&~(TIOCM_DTR|TIOCM_RTS))
- | (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);
}
spin_unlock(&port_priv->dp_port_lock);
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)
{
/* 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)
WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: linux-usb@vger.kernel.org
Cc: Johan Hovold <johan@kernel.org>
Subject: [PATCH 1/2] USB: serial: digi_acceleport: clean up modem-control handling
Date: Thu, 18 Apr 2019 18:20:19 +0200 [thread overview]
Message-ID: <20190418162020.23566-1-johan@kernel.org> (raw)
Message-ID: <20190418162019.p9yIbgPD5LfiEWf6LgoMmaDocNKousNHlk9K_PgB_fI@z> (raw)
Clean up modem-control handling somewhat by adding missing whitespace
around operators and splitting a long statement in two.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/digi_acceleport.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index e7f244cf2c07..4699e114f617 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -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);
if (ret == 0) {
oob_priv->dp_write_urb_in_use = 1;
- port_priv->dp_modem_signals =
- (port_priv->dp_modem_signals&~(TIOCM_DTR|TIOCM_RTS))
- | (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);
}
spin_unlock(&port_priv->dp_port_lock);
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)
{
/* 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)
--
2.21.0
next reply other threads:[~2019-04-18 16:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 16:20 Johan Hovold [this message]
2019-04-18 16:20 ` [PATCH 1/2] USB: serial: digi_acceleport: clean up modem-control handling Johan Hovold
-- strict thread matches above, loose matches on Subject: below --
2019-04-18 16:20 [2/2] USB: serial: digi_acceleport: clean up set_termios Johan Hovold
2019-04-18 16:20 ` [PATCH 2/2] " Johan Hovold
2019-04-19 8:27 [1/2] USB: serial: digi_acceleport: clean up modem-control handling Greg Kroah-Hartman
2019-04-19 8:27 ` [PATCH 1/2] " Greg KH
2019-04-19 8:27 [2/2] USB: serial: digi_acceleport: clean up set_termios Greg Kroah-Hartman
2019-04-19 8:27 ` [PATCH 2/2] " Greg KH
2019-04-21 12:26 [2/2] " Johan Hovold
2019-04-21 12:26 ` [PATCH 2/2] " Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190418162020.23566-1-johan@kernel.org \
--to=johan@kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.