Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304133
b: refs/heads/master
c: 042b9e7
h: refs/heads/master
i:
  304131: a741523
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent b89a0a9 commit 37fdcb6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4330d663fed02ace2feba1ab3795ab0c08148a28
refs/heads/master: 042b9e7c2bef3bc2b250921fee0ae52125812643
14 changes: 13 additions & 1 deletion trunk/drivers/isdn/i4l/isdn_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ isdn_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
* isdn_tty_open() and friends
* ------------------------------------------------------------
*/

static int
isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info *info)
{
Expand Down Expand Up @@ -1552,7 +1553,7 @@ isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info *
break;
}
if (!(port->flags & ASYNC_CLOSING) &&
(do_clocal || (info->msr & UART_MSR_DCD))) {
(do_clocal || tty_port_carrier_raised(port))) {
break;
}
if (signal_pending(current)) {
Expand Down Expand Up @@ -1848,6 +1849,16 @@ static const struct tty_operations modem_ops = {
.tiocmset = isdn_tty_tiocmset,
};

static int isdn_tty_carrier_raised(struct tty_port *port)
{
modem_info *info = container_of(port, modem_info, port);
return info->msr & UART_MSR_DCD;
}

static const struct tty_port_operations isdn_tty_port_ops = {
.carrier_raised = isdn_tty_carrier_raised,
};

int
isdn_tty_modem_init(void)
{
Expand Down Expand Up @@ -1884,6 +1895,7 @@ isdn_tty_modem_init(void)
}
#endif
tty_port_init(&info->port);
info->port.ops = &isdn_tty_port_ops;
spin_lock_init(&info->readlock);
sprintf(info->last_cause, "0000");
sprintf(info->last_num, "none");
Expand Down

0 comments on commit 37fdcb6

Please sign in to comment.