Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361647
b: refs/heads/master
c: fa1e11d
h: refs/heads/master
i:
  361645: a17f227
  361643: 1d226a4
  361639: 623bf36
  361631: 30f0d2b
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 21, 2013
1 parent 05e9f97 commit a74624c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 5018860321dc7a9e50a75d5f319bc981298fb5b7
refs/heads/master: fa1e11d5231c001c80a479160b5832933c5d35fb
11 changes: 6 additions & 5 deletions trunk/drivers/usb/serial/ch341.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ MODULE_DEVICE_TABLE(usb, id_table);

struct ch341_private {
spinlock_t lock; /* access lock */
wait_queue_head_t delta_msr_wait; /* wait queue for modem status */
unsigned baud_rate; /* set baud rate */
u8 line_control; /* set line control value RTS/DTR */
u8 line_status; /* active status of modem control inputs */
Expand Down Expand Up @@ -252,7 +251,6 @@ static int ch341_port_probe(struct usb_serial_port *port)
return -ENOMEM;

spin_lock_init(&priv->lock);
init_waitqueue_head(&priv->delta_msr_wait);
priv->baud_rate = DEFAULT_BAUD_RATE;
priv->line_control = CH341_BIT_RTS | CH341_BIT_DTR;

Expand Down Expand Up @@ -298,7 +296,7 @@ static void ch341_dtr_rts(struct usb_serial_port *port, int on)
priv->line_control &= ~(CH341_BIT_RTS | CH341_BIT_DTR);
spin_unlock_irqrestore(&priv->lock, flags);
ch341_set_handshake(port->serial->dev, priv->line_control);
wake_up_interruptible(&priv->delta_msr_wait);
wake_up_interruptible(&port->delta_msr_wait);
}

static void ch341_close(struct usb_serial_port *port)
Expand Down Expand Up @@ -491,7 +489,7 @@ static void ch341_read_int_callback(struct urb *urb)
tty_kref_put(tty);
}

wake_up_interruptible(&priv->delta_msr_wait);
wake_up_interruptible(&port->delta_msr_wait);
}

exit:
Expand All @@ -517,11 +515,14 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)
spin_unlock_irqrestore(&priv->lock, flags);

while (!multi_change) {
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;

spin_lock_irqsave(&priv->lock, flags);
status = priv->line_status;
multi_change = priv->multi_status_change;
Expand Down

0 comments on commit a74624c

Please sign in to comment.