aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/composite.c2
-rw-r--r--include/linux/usb/composite.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 125167e17ce5..e483f80822d2 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -956,6 +956,8 @@ static void composite_disconnect(struct usb_gadget *gadget)
956 spin_lock_irqsave(&cdev->lock, flags); 956 spin_lock_irqsave(&cdev->lock, flags);
957 if (cdev->config) 957 if (cdev->config)
958 reset_config(cdev); 958 reset_config(cdev);
959 if (composite->disconnect)
960 composite->disconnect(cdev);
959 spin_unlock_irqrestore(&cdev->lock, flags); 961 spin_unlock_irqrestore(&cdev->lock, flags);
960} 962}
961 963
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index f378075c839a..890bc1472190 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -276,6 +276,8 @@ struct usb_composite_driver {
276 int (*bind)(struct usb_composite_dev *); 276 int (*bind)(struct usb_composite_dev *);
277 int (*unbind)(struct usb_composite_dev *); 277 int (*unbind)(struct usb_composite_dev *);
278 278
279 void (*disconnect)(struct usb_composite_dev *);
280
279 /* global suspend hooks */ 281 /* global suspend hooks */
280 void (*suspend)(struct usb_composite_dev *); 282 void (*suspend)(struct usb_composite_dev *);
281 void (*resume)(struct usb_composite_dev *); 283 void (*resume)(struct usb_composite_dev *);