diff options
Diffstat (limited to 'drivers/usb/serial/generic.c')
-rw-r--r-- | drivers/usb/serial/generic.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 2b01ec8651c2..b63ce023f96f 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -173,16 +173,8 @@ retry: | |||
173 | clear_bit_unlock(USB_SERIAL_WRITE_BUSY, &port->flags); | 173 | clear_bit_unlock(USB_SERIAL_WRITE_BUSY, &port->flags); |
174 | return result; | 174 | return result; |
175 | } | 175 | } |
176 | /* | ||
177 | * Try sending off another urb, unless called from completion handler | ||
178 | * (in which case there will be no free urb or no data). | ||
179 | */ | ||
180 | if (mem_flags != GFP_ATOMIC) | ||
181 | goto retry; | ||
182 | 176 | ||
183 | clear_bit_unlock(USB_SERIAL_WRITE_BUSY, &port->flags); | 177 | goto retry; /* try sending off another urb */ |
184 | |||
185 | return 0; | ||
186 | } | 178 | } |
187 | EXPORT_SYMBOL_GPL(usb_serial_generic_write_start); | 179 | EXPORT_SYMBOL_GPL(usb_serial_generic_write_start); |
188 | 180 | ||
@@ -208,7 +200,7 @@ int usb_serial_generic_write(struct tty_struct *tty, | |||
208 | return 0; | 200 | return 0; |
209 | 201 | ||
210 | count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock); | 202 | count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock); |
211 | result = usb_serial_generic_write_start(port, GFP_KERNEL); | 203 | result = usb_serial_generic_write_start(port, GFP_ATOMIC); |
212 | if (result) | 204 | if (result) |
213 | return result; | 205 | return result; |
214 | 206 | ||