Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361646
b: refs/heads/master
c: 5018860
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 21, 2013
1 parent a17f227 commit 05e9f97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: e5b33dc9d16053c2ae4c2c669cf008829530364b
refs/heads/master: 5018860321dc7a9e50a75d5f319bc981298fb5b7
10 changes: 6 additions & 4 deletions trunk/drivers/usb/serial/ark3116.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ static int is_irda(struct usb_serial *serial)
}

struct ark3116_private {
wait_queue_head_t delta_msr_wait;
struct async_icount icount;
int irda; /* 1 for irda device */

Expand Down Expand Up @@ -146,7 +145,6 @@ static int ark3116_port_probe(struct usb_serial_port *port)
if (!priv)
return -ENOMEM;

init_waitqueue_head(&priv->delta_msr_wait);
mutex_init(&priv->hw_lock);
spin_lock_init(&priv->status_lock);

Expand Down Expand Up @@ -456,10 +454,14 @@ static int ark3116_ioctl(struct tty_struct *tty,
case TIOCMIWAIT:
for (;;) {
struct async_icount prev = priv->icount;
interruptible_sleep_on(&priv->delta_msr_wait);
interruptible_sleep_on(&port->delta_msr_wait);
/* see if a signal did it */
if (signal_pending(current))
return -ERESTARTSYS;

if (port->serial->disconnected)
return -EIO;

if ((prev.rng == priv->icount.rng) &&
(prev.dsr == priv->icount.dsr) &&
(prev.dcd == priv->icount.dcd) &&
Expand Down Expand Up @@ -580,7 +582,7 @@ static void ark3116_update_msr(struct usb_serial_port *port, __u8 msr)
priv->icount.dcd++;
if (msr & UART_MSR_TERI)
priv->icount.rng++;
wake_up_interruptible(&priv->delta_msr_wait);
wake_up_interruptible(&port->delta_msr_wait);
}
}

Expand Down

0 comments on commit 05e9f97

Please sign in to comment.