summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-06-18 08:15:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-18 13:10:03 +0200
commit1b3086b6e602f47d73be282d734dbebbce80d39a (patch)
tree93995bc02b1b711272d3bc00feebe6c6c2e88cdd /drivers/tty
parent202acdaa143a75d54dd9eec905c7faca7071c1a8 (diff)
downloadlwn-1b3086b6e602f47d73be282d734dbebbce80d39a.tar.gz
lwn-1b3086b6e602f47d73be282d734dbebbce80d39a.zip
mxser: use port variable in mxser_set_serial_info
mxser_set_serial_info already defined a local 'port' of type struct tty_port. So use it in the code everywhere. This eliminates some text from the code there. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20210618061516.662-65-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/mxser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 5dd121450813..2f724b4d3f43 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -1080,14 +1080,14 @@ static int mxser_set_serial_info(struct tty_struct *tty,
if (!capable(CAP_SYS_ADMIN)) {
if ((ss->baud_base != MXSER_BAUD_BASE) ||
- (close_delay != info->port.close_delay) ||
- (closing_wait != info->port.closing_wait) ||
- ((ss->flags & ~ASYNC_USR_MASK) != (info->port.flags & ~ASYNC_USR_MASK))) {
+ (close_delay != port->close_delay) ||
+ (closing_wait != port->closing_wait) ||
+ ((ss->flags & ~ASYNC_USR_MASK) != (port->flags & ~ASYNC_USR_MASK))) {
mutex_unlock(&port->mutex);
return -EPERM;
}
- info->port.flags = ((info->port.flags & ~ASYNC_USR_MASK) |
- (ss->flags & ASYNC_USR_MASK));
+ port->flags = (port->flags & ~ASYNC_USR_MASK) |
+ (ss->flags & ASYNC_USR_MASK);
} else {
/*
* OK, past this point, all the error checking has been done.