diff options
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r-- | drivers/usb/serial/option.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index bbbe1b962008..5e8bf1bc1e50 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -641,7 +641,10 @@ static void option_close(struct usb_serial_port *port, struct file *filp) | |||
641 | portdata->dtr_state = 0; | 641 | portdata->dtr_state = 0; |
642 | 642 | ||
643 | if (serial->dev) { | 643 | if (serial->dev) { |
644 | option_send_setup(port); | 644 | mutex_lock(&serial->disc_mutex); |
645 | if (!serial->disconnected) | ||
646 | option_send_setup(port); | ||
647 | mutex_unlock(&serial->disc_mutex); | ||
645 | 648 | ||
646 | /* Stop reading/writing urbs */ | 649 | /* Stop reading/writing urbs */ |
647 | for (i = 0; i < N_IN_URB; i++) | 650 | for (i = 0; i < N_IN_URB; i++) |