diff options
Diffstat (limited to 'drivers/tty/mxser.c')
-rw-r--r-- | drivers/tty/mxser.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 7dd38047ba23..8bc15cb67a58 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0+ | ||
1 | /* | 2 | /* |
2 | * mxser.c -- MOXA Smartio/Industio family multiport serial driver. | 3 | * mxser.c -- MOXA Smartio/Industio family multiport serial driver. |
3 | * | 4 | * |
@@ -8,11 +9,6 @@ | |||
8 | * Linux serial driver, written by Linus Torvalds, Theodore T'so and | 9 | * Linux serial driver, written by Linus Torvalds, Theodore T'so and |
9 | * others. | 10 | * others. |
10 | * | 11 | * |
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * Fed through a cleanup, indent and remove of non 2.6 code by Alan Cox | 12 | * Fed through a cleanup, indent and remove of non 2.6 code by Alan Cox |
17 | * <alan@lxorguk.ukuu.org.uk>. The original 1.8 code is available on | 13 | * <alan@lxorguk.ukuu.org.uk>. The original 1.8 code is available on |
18 | * www.moxa.com. | 14 | * www.moxa.com. |
@@ -642,8 +638,7 @@ static int mxser_set_baud(struct tty_struct *tty, long newspd) | |||
642 | * This routine is called to set the UART divisor registers to match | 638 | * This routine is called to set the UART divisor registers to match |
643 | * the specified baud rate for a serial port. | 639 | * the specified baud rate for a serial port. |
644 | */ | 640 | */ |
645 | static int mxser_change_speed(struct tty_struct *tty, | 641 | static int mxser_change_speed(struct tty_struct *tty) |
646 | struct ktermios *old_termios) | ||
647 | { | 642 | { |
648 | struct mxser_port *info = tty->driver_data; | 643 | struct mxser_port *info = tty->driver_data; |
649 | unsigned cflag, cval, fcr; | 644 | unsigned cflag, cval, fcr; |
@@ -945,7 +940,7 @@ static int mxser_activate(struct tty_port *port, struct tty_struct *tty) | |||
945 | /* | 940 | /* |
946 | * and set the speed of the serial port | 941 | * and set the speed of the serial port |
947 | */ | 942 | */ |
948 | mxser_change_speed(tty, NULL); | 943 | mxser_change_speed(tty); |
949 | spin_unlock_irqrestore(&info->slock, flags); | 944 | spin_unlock_irqrestore(&info->slock, flags); |
950 | 945 | ||
951 | return 0; | 946 | return 0; |
@@ -1288,7 +1283,7 @@ static int mxser_set_serial_info(struct tty_struct *tty, | |||
1288 | if (tty_port_initialized(port)) { | 1283 | if (tty_port_initialized(port)) { |
1289 | if (flags != (port->flags & ASYNC_SPD_MASK)) { | 1284 | if (flags != (port->flags & ASYNC_SPD_MASK)) { |
1290 | spin_lock_irqsave(&info->slock, sl_flags); | 1285 | spin_lock_irqsave(&info->slock, sl_flags); |
1291 | mxser_change_speed(tty, NULL); | 1286 | mxser_change_speed(tty); |
1292 | spin_unlock_irqrestore(&info->slock, sl_flags); | 1287 | spin_unlock_irqrestore(&info->slock, sl_flags); |
1293 | } | 1288 | } |
1294 | } else { | 1289 | } else { |
@@ -1946,7 +1941,7 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi | |||
1946 | unsigned long flags; | 1941 | unsigned long flags; |
1947 | 1942 | ||
1948 | spin_lock_irqsave(&info->slock, flags); | 1943 | spin_lock_irqsave(&info->slock, flags); |
1949 | mxser_change_speed(tty, old_termios); | 1944 | mxser_change_speed(tty); |
1950 | spin_unlock_irqrestore(&info->slock, flags); | 1945 | spin_unlock_irqrestore(&info->slock, flags); |
1951 | 1946 | ||
1952 | if ((old_termios->c_cflag & CRTSCTS) && !C_CRTSCTS(tty)) { | 1947 | if ((old_termios->c_cflag & CRTSCTS) && !C_CRTSCTS(tty)) { |
@@ -2375,8 +2370,7 @@ static void mxser_release_ISA_res(struct mxser_board *brd) | |||
2375 | mxser_release_vector(brd); | 2370 | mxser_release_vector(brd); |
2376 | } | 2371 | } |
2377 | 2372 | ||
2378 | static int mxser_initbrd(struct mxser_board *brd, | 2373 | static int mxser_initbrd(struct mxser_board *brd) |
2379 | struct pci_dev *pdev) | ||
2380 | { | 2374 | { |
2381 | struct mxser_port *info; | 2375 | struct mxser_port *info; |
2382 | unsigned int i; | 2376 | unsigned int i; |
@@ -2640,7 +2634,7 @@ static int mxser_probe(struct pci_dev *pdev, | |||
2640 | } | 2634 | } |
2641 | 2635 | ||
2642 | /* mxser_initbrd will hook ISR. */ | 2636 | /* mxser_initbrd will hook ISR. */ |
2643 | retval = mxser_initbrd(brd, pdev); | 2637 | retval = mxser_initbrd(brd); |
2644 | if (retval) | 2638 | if (retval) |
2645 | goto err_rel3; | 2639 | goto err_rel3; |
2646 | 2640 | ||
@@ -2746,7 +2740,7 @@ static int __init mxser_module_init(void) | |||
2746 | brd->info->name, ioaddr[b]); | 2740 | brd->info->name, ioaddr[b]); |
2747 | 2741 | ||
2748 | /* mxser_initbrd will hook ISR. */ | 2742 | /* mxser_initbrd will hook ISR. */ |
2749 | if (mxser_initbrd(brd, NULL) < 0) { | 2743 | if (mxser_initbrd(brd) < 0) { |
2750 | mxser_release_ISA_res(brd); | 2744 | mxser_release_ISA_res(brd); |
2751 | brd->info = NULL; | 2745 | brd->info = NULL; |
2752 | continue; | 2746 | continue; |