aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/aircable.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/aircable.c')
-rw-r--r--drivers/usb/serial/aircable.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index 2cbfab3716e5..b10ac8409411 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -554,13 +554,12 @@ static void aircable_throttle(struct tty_struct *tty)
554{ 554{
555 struct usb_serial_port *port = tty->driver_data; 555 struct usb_serial_port *port = tty->driver_data;
556 struct aircable_private *priv = usb_get_serial_port_data(port); 556 struct aircable_private *priv = usb_get_serial_port_data(port);
557 unsigned long flags;
558 557
559 dbg("%s - port %d", __func__, port->number); 558 dbg("%s - port %d", __func__, port->number);
560 559
561 spin_lock_irqsave(&priv->rx_lock, flags); 560 spin_lock_irq(&priv->rx_lock);
562 priv->rx_flags |= THROTTLED; 561 priv->rx_flags |= THROTTLED;
563 spin_unlock_irqrestore(&priv->rx_lock, flags); 562 spin_unlock_irq(&priv->rx_lock);
564} 563}
565 564
566/* Based on ftdi_sio.c unthrottle */ 565/* Based on ftdi_sio.c unthrottle */
@@ -569,14 +568,13 @@ static void aircable_unthrottle(struct tty_struct *tty)
569 struct usb_serial_port *port = tty->driver_data; 568 struct usb_serial_port *port = tty->driver_data;
570 struct aircable_private *priv = usb_get_serial_port_data(port); 569 struct aircable_private *priv = usb_get_serial_port_data(port);
571 int actually_throttled; 570 int actually_throttled;
572 unsigned long flags;
573 571
574 dbg("%s - port %d", __func__, port->number); 572 dbg("%s - port %d", __func__, port->number);
575 573
576 spin_lock_irqsave(&priv->rx_lock, flags); 574 spin_lock_irq(&priv->rx_lock);
577 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; 575 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
578 priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); 576 priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED);
579 spin_unlock_irqrestore(&priv->rx_lock, flags); 577 spin_unlock_irq(&priv->rx_lock);
580 578
581 if (actually_throttled) 579 if (actually_throttled)
582 schedule_work(&priv->rx_work); 580 schedule_work(&priv->rx_work);