diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2022-05-11 20:22:22 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2022-05-11 20:22:22 +0200 |
commit | b7c15a3ce6fea5da3aa836c897a78ac628467d54 (patch) | |
tree | 0e941036165a7d6261e77a756693f5d0b13bbbe4 /drivers/usb/dwc3/drd.c | |
parent | ef3a6b70507a2add2cd2e01f5eb9b54d561bacb9 (diff) | |
parent | c5eb0a61238dd6faf37f58c9ce61c9980aaffd7a (diff) |
Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes
Requested by Zack for vmwgfx fixes.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/drd.c')
-rw-r--r-- | drivers/usb/dwc3/drd.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c index b60b5f7b6dff..8cad9e7d3368 100644 --- a/drivers/usb/dwc3/drd.c +++ b/drivers/usb/dwc3/drd.c @@ -584,16 +584,15 @@ int dwc3_drd_init(struct dwc3 *dwc) { int ret, irq; + if (ROLE_SWITCH && + device_property_read_bool(dwc->dev, "usb-role-switch")) + return dwc3_setup_role_switch(dwc); + dwc->edev = dwc3_get_extcon(dwc); if (IS_ERR(dwc->edev)) return PTR_ERR(dwc->edev); - if (ROLE_SWITCH && - device_property_read_bool(dwc->dev, "usb-role-switch")) { - ret = dwc3_setup_role_switch(dwc); - if (ret < 0) - return ret; - } else if (dwc->edev) { + if (dwc->edev) { dwc->edev_nb.notifier_call = dwc3_drd_notifier; ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST, &dwc->edev_nb); |