diff options
Diffstat (limited to 'drivers/tty/serial/max3100.c')
-rw-r--r-- | drivers/tty/serial/max3100.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index ace82645b123..27d6049eb6a9 100644 --- a/drivers/tty/serial/max3100.c +++ b/drivers/tty/serial/max3100.c | |||
@@ -1,13 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0+ | ||
1 | /* | 2 | /* |
2 | * | 3 | * |
3 | * Copyright (C) 2008 Christian Pellegrin <chripell@evolware.org> | 4 | * Copyright (C) 2008 Christian Pellegrin <chripell@evolware.org> |
4 | * | 5 | * |
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * | ||
11 | * Notes: the MAX3100 doesn't provide an interrupt on CTS so we have | 6 | * Notes: the MAX3100 doesn't provide an interrupt on CTS so we have |
12 | * to use polling for flow control. TX empty IRQ is unusable, since | 7 | * to use polling for flow control. TX empty IRQ is unusable, since |
13 | * writing conf clears FIFO buffer and we cannot have this interrupt | 8 | * writing conf clears FIFO buffer and we cannot have this interrupt |
@@ -263,7 +258,7 @@ static void max3100_work(struct work_struct *w) | |||
263 | struct max3100_port *s = container_of(w, struct max3100_port, work); | 258 | struct max3100_port *s = container_of(w, struct max3100_port, work); |
264 | int rxchars; | 259 | int rxchars; |
265 | u16 tx, rx; | 260 | u16 tx, rx; |
266 | int conf, cconf, rts, crts; | 261 | int conf, cconf, crts; |
267 | struct circ_buf *xmit = &s->port.state->xmit; | 262 | struct circ_buf *xmit = &s->port.state->xmit; |
268 | 263 | ||
269 | dev_dbg(&s->spi->dev, "%s\n", __func__); | 264 | dev_dbg(&s->spi->dev, "%s\n", __func__); |
@@ -274,7 +269,6 @@ static void max3100_work(struct work_struct *w) | |||
274 | conf = s->conf; | 269 | conf = s->conf; |
275 | cconf = s->conf_commit; | 270 | cconf = s->conf_commit; |
276 | s->conf_commit = 0; | 271 | s->conf_commit = 0; |
277 | rts = s->rts; | ||
278 | crts = s->rts_commit; | 272 | crts = s->rts_commit; |
279 | s->rts_commit = 0; | 273 | s->rts_commit = 0; |
280 | spin_unlock(&s->conf_lock); | 274 | spin_unlock(&s->conf_lock); |
@@ -436,7 +430,6 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios, | |||
436 | dev_dbg(&s->spi->dev, "%s\n", __func__); | 430 | dev_dbg(&s->spi->dev, "%s\n", __func__); |
437 | 431 | ||
438 | cflag = termios->c_cflag; | 432 | cflag = termios->c_cflag; |
439 | param_new = 0; | ||
440 | param_mask = 0; | 433 | param_mask = 0; |
441 | 434 | ||
442 | baud = tty_termios_baud_rate(termios); | 435 | baud = tty_termios_baud_rate(termios); |
@@ -787,9 +780,8 @@ static int max3100_probe(struct spi_device *spi) | |||
787 | max3100s[i]->poll_time = 1; | 780 | max3100s[i]->poll_time = 1; |
788 | max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend; | 781 | max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend; |
789 | max3100s[i]->minor = i; | 782 | max3100s[i]->minor = i; |
790 | init_timer(&max3100s[i]->timer); | 783 | setup_timer(&max3100s[i]->timer, max3100_timeout, |
791 | max3100s[i]->timer.function = max3100_timeout; | 784 | (unsigned long)max3100s[i]); |
792 | max3100s[i]->timer.data = (unsigned long) max3100s[i]; | ||
793 | 785 | ||
794 | dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i); | 786 | dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i); |
795 | max3100s[i]->port.irq = max3100s[i]->irq; | 787 | max3100s[i]->port.irq = max3100s[i]->irq; |