diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index 56da49f31d6c..c261887e05ae 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c | |||
@@ -411,8 +411,12 @@ static ssize_t usb_udc_softconn_store(struct device *dev, | |||
411 | struct usb_udc *udc = container_of(dev, struct usb_udc, dev); | 411 | struct usb_udc *udc = container_of(dev, struct usb_udc, dev); |
412 | 412 | ||
413 | if (sysfs_streq(buf, "connect")) { | 413 | if (sysfs_streq(buf, "connect")) { |
414 | if (udc_is_newstyle(udc)) | ||
415 | usb_gadget_udc_start(udc->gadget, udc->driver); | ||
414 | usb_gadget_connect(udc->gadget); | 416 | usb_gadget_connect(udc->gadget); |
415 | } else if (sysfs_streq(buf, "disconnect")) { | 417 | } else if (sysfs_streq(buf, "disconnect")) { |
418 | if (udc_is_newstyle(udc)) | ||
419 | usb_gadget_udc_stop(udc->gadget, udc->driver); | ||
416 | usb_gadget_disconnect(udc->gadget); | 420 | usb_gadget_disconnect(udc->gadget); |
417 | } else { | 421 | } else { |
418 | dev_err(dev, "unsupported command '%s'\n", buf); | 422 | dev_err(dev, "unsupported command '%s'\n", buf); |