aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-07 01:47:12 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-07 01:47:12 -0500
commit3c9b3a8575b4f2551e3b5b74ffa1c3559c6338eb (patch)
tree7f8d84353852401ec74e005f6f0b1eb958b9a70d /drivers/usb/class/cdc-acm.c
parentc0d3c0c0ce94d3db893577ae98e64414d92e49d8 (diff)
parentc03296a868ae7c91aa2d8b372184763b18f16d7a (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r--drivers/usb/class/cdc-acm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index b9fd39fd1b5b..97bdeb1c2181 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1014,8 +1014,13 @@ static void acm_disconnect(struct usb_interface *intf)
1014 } 1014 }
1015 1015
1016 down(&open_sem); 1016 down(&open_sem);
1017 if (!usb_get_intfdata(intf)) {
1018 up(&open_sem);
1019 return;
1020 }
1017 acm->dev = NULL; 1021 acm->dev = NULL;
1018 usb_set_intfdata (intf, NULL); 1022 usb_set_intfdata(acm->control, NULL);
1023 usb_set_intfdata(acm->data, NULL);
1019 1024
1020 tasklet_disable(&acm->urb_task); 1025 tasklet_disable(&acm->urb_task);
1021 1026
@@ -1036,7 +1041,7 @@ static void acm_disconnect(struct usb_interface *intf)
1036 for (i = 0; i < ACM_NRB; i++) 1041 for (i = 0; i < ACM_NRB; i++)
1037 usb_buffer_free(usb_dev, acm->readsize, acm->rb[i].base, acm->rb[i].dma); 1042 usb_buffer_free(usb_dev, acm->readsize, acm->rb[i].base, acm->rb[i].dma);
1038 1043
1039 usb_driver_release_interface(&acm_driver, acm->data); 1044 usb_driver_release_interface(&acm_driver, intf == acm->control ? acm->data : intf);
1040 1045
1041 if (!acm->used) { 1046 if (!acm->used) {
1042 acm_tty_unregister(acm); 1047 acm_tty_unregister(acm);