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 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * * Copyright (C) 2008 Christian Pellegrin <chripell@evolware.org> * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * * Notes: the MAX3100 doesn't provide an interrupt on CTS so we have * to use polling for flow control. TX empty IRQ is unusable, since * writing conf clears FIFO buffer and we cannot have this interrupt @@ -263,7 +258,7 @@ static void max3100_work(struct work_struct *w) struct max3100_port *s = container_of(w, struct max3100_port, work); int rxchars; u16 tx, rx; - int conf, cconf, rts, crts; + int conf, cconf, crts; struct circ_buf *xmit = &s->port.state->xmit; dev_dbg(&s->spi->dev, "%s\n", __func__); @@ -274,7 +269,6 @@ static void max3100_work(struct work_struct *w) conf = s->conf; cconf = s->conf_commit; s->conf_commit = 0; - rts = s->rts; crts = s->rts_commit; s->rts_commit = 0; spin_unlock(&s->conf_lock); @@ -436,7 +430,6 @@ max3100_set_termios(struct uart_port *port, struct ktermios *termios, dev_dbg(&s->spi->dev, "%s\n", __func__); cflag = termios->c_cflag; - param_new = 0; param_mask = 0; baud = tty_termios_baud_rate(termios); @@ -787,9 +780,8 @@ static int max3100_probe(struct spi_device *spi) max3100s[i]->poll_time = 1; max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend; max3100s[i]->minor = i; - init_timer(&max3100s[i]->timer); - max3100s[i]->timer.function = max3100_timeout; - max3100s[i]->timer.data = (unsigned long) max3100s[i]; + setup_timer(&max3100s[i]->timer, max3100_timeout, + (unsigned long)max3100s[i]); dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i); max3100s[i]->port.irq = max3100s[i]->irq; |