aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/moxa.c
Commit message (Collapse)AuthorAgeFilesLines
* tty: moxa: fix bit test in moxa_start()Dan Carpenter2012-04-021-1/+1
| | | | | | | | | | | | | commit 58112dfbfe02d803566a2c6c8bd97b5fa3c62cdc upstream. This is supposed to be doing a shift before the comparison instead of just doing a bitwise AND directly. The current code means the start() just returns without doing anything. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/tty/moxa.c: Put correct tty valueJulia Lawall2011-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tty value that should be put is the one that was just gotten by tty_port_tty_get, not the one that is the argument to the enclosing function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ local idexpression struct tty_struct *x; expression ra,rr; statement S1,S2; @@ x = tty_port_tty_get(...) ... when != x = rr when any when != tty_kref_put(x,...) when != if (...) { ... tty_kref_put(x,...) ...} ( if(<+...x...+>) S1 else S2 | if(...) { ... when != x = ra when forall when != tty_kref_put(x,...) *return...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Char: moxa, fix locking in moxa_writeJiri Slaby2011-04-251-2/+3
| | | | | | | | | | | | moxa_write can be called from atomic context with irqs disabled (from ppp_async_push). Don't enable interrupts by spin_unlock_bh as this might cause deadlocks in the ppp layer. Instead, use irqsave/irqrestore spin_lock functions. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Char: moxa, do not touch NORMAL_ACTIVE bitJiri Slaby2011-04-191-6/+1
| | | | | | | | | The bit is set in tty_port_block_til_ready (via moxa_open) and unset in tty_port_close (via moxa_close). No need to pin it in the driver. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Char: moxa, remove unused variablesJiri Slaby2011-04-191-4/+0
| | | | | | | | | | | | drivers/tty/moxa.c:1287:2: warning: Value stored to 'port' is never read port = tty->index; ^ ~~~~~~~~~~ drivers/tty/moxa.c:1763:2: warning: Value stored to 'cflag' is never read cflag = termio->c_cflag; /* termio->c_cflag */ ^ ~~~~~~~~~~~~~~~ Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: move a number of tty drivers from drivers/char/ to drivers/tty/Greg Kroah-Hartman2011-02-221-0/+2092
As planned by Arnd Bergmann, this moves the following drivers from drivers/char/ to drivers/tty/ as that's where they really belong: amiserial nozomi synclink rocket cyclades moxa mxser isicom bfin_jtag_comm Cc: Arnd Bergmann <arnd@arndb.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>