diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-09-27 18:53:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-15 09:01:43 +0300 |
commit | d42228fc2cad15a3f1e18abba15b7a3bf7b24e75 (patch) | |
tree | 8373cc1a9e1afab1b7f42b5dd66cdeced75b5876 /drivers/usb | |
parent | 5857b9cd9b9172700d6322e66ab57815daa97d2d (diff) | |
download | linux-d42228fc2cad15a3f1e18abba15b7a3bf7b24e75.tar.xz |
Revert "USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present""
commit 2adc960ce79d3231b02f820daeee434542fe2911 upstream.
This reverts commit 8bd6b8c4b1009d7d2662138d6bdc6fe58a9274c5.
Prerequisite revert for the reverting of the original commit 0f0101719138.
Fixes: 8bd6b8c4b100 ("USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present"")
Fixes: 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present")
Reported-by: Ferry Toth <fntoth@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <fntoth@gmail.com> # for Merrifield
Link: https://lore.kernel.org/r/20220927155332.10762-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 08ca65ffe57b..812269d394ea 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1650,8 +1650,13 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc) * This device property is for kernel internal use only and * is expected to be set by the glue code. */ - if (device_property_read_string(dev, "linux,extcon-name", &name) == 0) - return extcon_get_extcon_dev(name); + if (device_property_read_string(dev, "linux,extcon-name", &name) == 0) { + edev = extcon_get_extcon_dev(name); + if (!edev) + return ERR_PTR(-EPROBE_DEFER); + + return edev; + } /* * Try to get an extcon device from the USB PHY controller's "port" |