diff options
Diffstat (limited to 'drivers/usb/serial/visor.c')
-rw-r--r-- | drivers/usb/serial/visor.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 8e2d6dd9add0..b9341f0e452b 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c | |||
@@ -583,12 +583,11 @@ static void visor_throttle(struct tty_struct *tty) | |||
583 | { | 583 | { |
584 | struct usb_serial_port *port = tty->driver_data; | 584 | struct usb_serial_port *port = tty->driver_data; |
585 | struct visor_private *priv = usb_get_serial_port_data(port); | 585 | struct visor_private *priv = usb_get_serial_port_data(port); |
586 | unsigned long flags; | ||
587 | 586 | ||
588 | dbg("%s - port %d", __func__, port->number); | 587 | dbg("%s - port %d", __func__, port->number); |
589 | spin_lock_irqsave(&priv->lock, flags); | 588 | spin_lock_irq(&priv->lock); |
590 | priv->throttled = 1; | 589 | priv->throttled = 1; |
591 | spin_unlock_irqrestore(&priv->lock, flags); | 590 | spin_unlock_irq(&priv->lock); |
592 | } | 591 | } |
593 | 592 | ||
594 | 593 | ||
@@ -596,17 +595,16 @@ static void visor_unthrottle(struct tty_struct *tty) | |||
596 | { | 595 | { |
597 | struct usb_serial_port *port = tty->driver_data; | 596 | struct usb_serial_port *port = tty->driver_data; |
598 | struct visor_private *priv = usb_get_serial_port_data(port); | 597 | struct visor_private *priv = usb_get_serial_port_data(port); |
599 | unsigned long flags; | ||
600 | int result; | 598 | int result; |
601 | 599 | ||
602 | dbg("%s - port %d", __func__, port->number); | 600 | dbg("%s - port %d", __func__, port->number); |
603 | spin_lock_irqsave(&priv->lock, flags); | 601 | spin_lock_irq(&priv->lock); |
604 | priv->throttled = 0; | 602 | priv->throttled = 0; |
605 | priv->actually_throttled = 0; | 603 | priv->actually_throttled = 0; |
606 | spin_unlock_irqrestore(&priv->lock, flags); | 604 | spin_unlock_irq(&priv->lock); |
607 | 605 | ||
608 | port->read_urb->dev = port->serial->dev; | 606 | port->read_urb->dev = port->serial->dev; |
609 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 607 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); |
610 | if (result) | 608 | if (result) |
611 | dev_err(&port->dev, | 609 | dev_err(&port->dev, |
612 | "%s - failed submitting read urb, error %d\n", | 610 | "%s - failed submitting read urb, error %d\n", |