aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/max3100.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-14 00:05:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-14 00:05:31 -0500
commitfb0255fb2941ef6f21742b2bc146d6b9aef4fedc (patch)
tree8334f3485152b1c887ddfe04ba9a95c8a704481c /drivers/tty/serial/max3100.c
parent449fcf3ab0baf3dde9952385e6789f2ca10c3980 (diff)
parent57f5d648c45c3d40a3257c06629c14fd53c383bc (diff)
Merge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH: "Here is the big tty/serial driver pull request for 4.15-rc1. Lots of serial driver updates in here, some small vt cleanups, and a raft of SPDX and license boilerplate cleanups, messing up the diffstat a bit. Nothing major, with no realy functional changes except better hardware support for some platforms. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits) tty: ehv_bytechan: fix spelling mistake tty: serial: meson: allow baud-rates lower than 9600 serial: 8250_fintek: Fix crash with baud rate B0 serial: 8250_fintek: Disable delays for ports != 0 serial: 8250_fintek: Return -EINVAL on invalid configuration tty: Remove redundant license text tty: serdev: Remove redundant license text tty: hvc: Remove redundant license text tty: serial: Remove redundant license text tty: add SPDX identifiers to all remaining files in drivers/tty/ tty: serial: jsm: remove redundant pointer ts tty: serial: jsm: add space before the open parenthesis '(' tty: serial: jsm: fix coding style tty: serial: jsm: delete space between function name and '(' tty: serial: jsm: add blank line after declarations tty: serial: jsm: change the type of local variable tty: serial: imx: remove dead code imx_dma_rxint tty: serial: imx: disable ageing timer interrupt if dma in use serial: 8250: fix potential deadlock in rs485-mode serial: m32r_sio: Drop redundant .data assignment ...
Diffstat (limited to 'drivers/tty/serial/max3100.c')
-rw-r--r--drivers/tty/serial/max3100.c16
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;