aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/symbolserial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/symbolserial.c')
-rw-r--r--drivers/usb/serial/symbolserial.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c
index f25e54526843..b282c0f2d8e5 100644
--- a/drivers/usb/serial/symbolserial.c
+++ b/drivers/usb/serial/symbolserial.c
@@ -165,33 +165,31 @@ static void symbol_throttle(struct tty_struct *tty)
165{ 165{
166 struct usb_serial_port *port = tty->driver_data; 166 struct usb_serial_port *port = tty->driver_data;
167 struct symbol_private *priv = usb_get_serial_data(port->serial); 167 struct symbol_private *priv = usb_get_serial_data(port->serial);
168 unsigned long flags;
169 168
170 dbg("%s - port %d", __func__, port->number); 169 dbg("%s - port %d", __func__, port->number);
171 spin_lock_irqsave(&priv->lock, flags); 170 spin_lock_irq(&priv->lock);
172 priv->throttled = true; 171 priv->throttled = true;
173 spin_unlock_irqrestore(&priv->lock, flags); 172 spin_unlock_irq(&priv->lock);
174} 173}
175 174
176static void symbol_unthrottle(struct tty_struct *tty) 175static void symbol_unthrottle(struct tty_struct *tty)
177{ 176{
178 struct usb_serial_port *port = tty->driver_data; 177 struct usb_serial_port *port = tty->driver_data;
179 struct symbol_private *priv = usb_get_serial_data(port->serial); 178 struct symbol_private *priv = usb_get_serial_data(port->serial);
180 unsigned long flags;
181 int result; 179 int result;
182 bool was_throttled; 180 bool was_throttled;
183 181
184 dbg("%s - port %d", __func__, port->number); 182 dbg("%s - port %d", __func__, port->number);
185 183
186 spin_lock_irqsave(&priv->lock, flags); 184 spin_lock_irq(&priv->lock);
187 priv->throttled = false; 185 priv->throttled = false;
188 was_throttled = priv->actually_throttled; 186 was_throttled = priv->actually_throttled;
189 priv->actually_throttled = false; 187 priv->actually_throttled = false;
190 spin_unlock_irqrestore(&priv->lock, flags); 188 spin_unlock_irq(&priv->lock);
191 189
192 priv->int_urb->dev = port->serial->dev; 190 priv->int_urb->dev = port->serial->dev;
193 if (was_throttled) { 191 if (was_throttled) {
194 result = usb_submit_urb(priv->int_urb, GFP_ATOMIC); 192 result = usb_submit_urb(priv->int_urb, GFP_KERNEL);
195 if (result) 193 if (result)
196 dev_err(&port->dev, 194 dev_err(&port->dev,
197 "%s - failed submitting read urb, error %d\n", 195 "%s - failed submitting read urb, error %d\n",