Add reset API at usb_gadget_driver Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx> --- drivers/usb/gadget/legacy/dbgp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/legacy/dbgp.c b/drivers/usb/gadget/legacy/dbgp.c index 986fc51..b34140d 100644 --- a/drivers/usb/gadget/legacy/dbgp.c +++ b/drivers/usb/gadget/legacy/dbgp.c @@ -209,7 +209,7 @@ fail_1: } #endif -static void dbgp_disconnect(struct usb_gadget *gadget) +static void __dbgp_disconnect(struct usb_gadget *gadget) { #ifdef CONFIG_USB_G_DBGP_PRINTK dbgp_disable_ep(); @@ -218,6 +218,17 @@ static void dbgp_disconnect(struct usb_gadget *gadget) #endif } +static void dbgp_disconnect(struct usb_gadget *gadget) +{ + __dbgp_disconnect(gadget); + usb_gadget_disconnect(gadget); +} + +static void dbgp_reset(struct usb_gadget *gadget) +{ + __dbgp_disconnect(gadget); +} + static void dbgp_unbind(struct usb_gadget *gadget) { #ifdef CONFIG_USB_G_DBGP_SERIAL @@ -408,6 +419,7 @@ static __refdata struct usb_gadget_driver dbgp_driver = { .bind = dbgp_bind, .unbind = dbgp_unbind, .setup = dbgp_setup, + .reset = dbgp_reset, .disconnect = dbgp_disconnect, .driver = { .owner = THIS_MODULE, -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html