mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
Char: moxa, do not touch NORMAL_ACTIVE bit
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>
This commit is contained in:
parent
a664ec9675
commit
7c31bdb6b2
1 changed files with 1 additions and 6 deletions
|
@ -1129,7 +1129,6 @@ static void moxa_shutdown(struct tty_port *port)
|
||||||
struct moxa_port *ch = container_of(port, struct moxa_port, port);
|
struct moxa_port *ch = container_of(port, struct moxa_port, port);
|
||||||
MoxaPortDisable(ch);
|
MoxaPortDisable(ch);
|
||||||
MoxaPortFlushData(ch, 2);
|
MoxaPortFlushData(ch, 2);
|
||||||
clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int moxa_carrier_raised(struct tty_port *port)
|
static int moxa_carrier_raised(struct tty_port *port)
|
||||||
|
@ -1155,7 +1154,6 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
|
||||||
struct moxa_board_conf *brd;
|
struct moxa_board_conf *brd;
|
||||||
struct moxa_port *ch;
|
struct moxa_port *ch;
|
||||||
int port;
|
int port;
|
||||||
int retval;
|
|
||||||
|
|
||||||
port = tty->index;
|
port = tty->index;
|
||||||
if (port == MAX_PORTS) {
|
if (port == MAX_PORTS) {
|
||||||
|
@ -1190,10 +1188,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
|
||||||
mutex_unlock(&ch->port.mutex);
|
mutex_unlock(&ch->port.mutex);
|
||||||
mutex_unlock(&moxa_openlock);
|
mutex_unlock(&moxa_openlock);
|
||||||
|
|
||||||
retval = tty_port_block_til_ready(&ch->port, tty, filp);
|
return tty_port_block_til_ready(&ch->port, tty, filp);
|
||||||
if (retval == 0)
|
|
||||||
set_bit(ASYNCB_NORMAL_ACTIVE, &ch->port.flags);
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void moxa_close(struct tty_struct *tty, struct file *filp)
|
static void moxa_close(struct tty_struct *tty, struct file *filp)
|
||||||
|
|
Loading…
Reference in a new issue