diff options
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index fe940e0536e..f51e22490ed 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -921,6 +921,10 @@ skip_normal_probe: | |||
921 | return -EINVAL; | 921 | return -EINVAL; |
922 | } | 922 | } |
923 | } | 923 | } |
924 | |||
925 | /* Accept probe requests only for the control interface */ | ||
926 | if (intf != control_interface) | ||
927 | return -ENODEV; | ||
924 | 928 | ||
925 | if (usb_interface_claimed(data_interface)) { /* valid in this context */ | 929 | if (usb_interface_claimed(data_interface)) { /* valid in this context */ |
926 | dev_dbg(&intf->dev,"The data interface isn't available"); | 930 | dev_dbg(&intf->dev,"The data interface isn't available"); |
@@ -1109,10 +1113,12 @@ static void acm_disconnect(struct usb_interface *intf) | |||
1109 | return; | 1113 | return; |
1110 | } | 1114 | } |
1111 | if (acm->country_codes){ | 1115 | if (acm->country_codes){ |
1112 | device_remove_file(&intf->dev, &dev_attr_wCountryCodes); | 1116 | device_remove_file(&acm->control->dev, |
1113 | device_remove_file(&intf->dev, &dev_attr_iCountryCodeRelDate); | 1117 | &dev_attr_wCountryCodes); |
1118 | device_remove_file(&acm->control->dev, | ||
1119 | &dev_attr_iCountryCodeRelDate); | ||
1114 | } | 1120 | } |
1115 | device_remove_file(&intf->dev, &dev_attr_bmCapabilities); | 1121 | device_remove_file(&acm->control->dev, &dev_attr_bmCapabilities); |
1116 | acm->dev = NULL; | 1122 | acm->dev = NULL; |
1117 | usb_set_intfdata(acm->control, NULL); | 1123 | usb_set_intfdata(acm->control, NULL); |
1118 | usb_set_intfdata(acm->data, NULL); | 1124 | usb_set_intfdata(acm->data, NULL); |