usb: gadget: configfs: handle gadget reset request for android
authorAmit Pundir <amit.pundir@linaro.org>
Tue, 6 Oct 2015 15:23:27 +0000 (20:53 +0530)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:52:15 +0000 (13:52 -0800)
There is this new mandatory UDC->reset API in v3.18+ kernels,
commit ef979a26 "usb: gadget: add reset API at usb_gadget_driver".

Let android_disconnect handle that for Android, similar to
how composite_disconnect is handling the generic ConfigFS
gadget reset request.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
drivers/usb/gadget/configfs.c

index 542d60792e2ccc369c6bb5dc9626159193a60834..ac4c641eb20b276f71b8e653bcaf25031223e88d 100644 (file)
@@ -1548,6 +1548,7 @@ static const struct usb_gadget_driver configfs_driver_template = {
        .unbind         = configfs_composite_unbind,
 #ifdef CONFIG_USB_CONFIGFS_UEVENT
        .setup          = android_setup,
+       .reset          = android_disconnect,
        .disconnect     = android_disconnect,
 #else
        .setup          = composite_setup,