diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-07-08 18:49:15 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-07-08 18:49:15 +0200 |
commit | facbf0b9820f34f14b54f567862b4a96e910f468 (patch) | |
tree | ee65e875e4167dd903f2745cfbf6b2735fd1cd9e /drivers/usb/dwc2/platform.c | |
parent | perf symbols: Add s390 idle functions 'psw_idle' and 'psw_idle_exit' to list ... (diff) | |
parent | Merge tag 'perf-tools-fixes-2020-07-07' of git://git.kernel.org/pub/scm/linux... (diff) | |
download | linux-facbf0b9820f34f14b54f567862b4a96e910f468.tar.xz linux-facbf0b9820f34f14b54f567862b4a96e910f468.zip |
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes and move perf/core forward, minor conflict as
perf_evlist__add_dummy() lost its 'perf_' prefix as it operates on a
'struct evlist', not on a 'struct perf_evlist', i.e. its tools/perf/
specific, it is not in libperf.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/usb/dwc2/platform.c')
-rw-r--r-- | drivers/usb/dwc2/platform.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index e571c8ae65ec..c347d93eae64 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -575,6 +575,17 @@ static int dwc2_driver_probe(struct platform_device *dev) if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) dwc2_lowlevel_hw_disable(hsotg); +#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \ + IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) + /* Postponed adding a new gadget to the udc class driver list */ + if (hsotg->gadget_enabled) { + retval = usb_add_gadget_udc(hsotg->dev, &hsotg->gadget); + if (retval) { + dwc2_hsotg_remove(hsotg); + goto error_init; + } + } +#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */ return 0; error_init: |