mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
UPSTREAM: usb: dwc3: drd: Defer probe if extcon device is not found
In case the "linux,extcon-name" property is defined but device itself
is not ready, defer the probe.
Change-Id: I66ec092bb74d92aaf6ef687156713a15224a5caf
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 98bba546e8)
This commit is contained in:
parent
6933711403
commit
e980094b89
|
|
@ -457,8 +457,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;
|
||||
}
|
||||
|
||||
np_phy = of_parse_phandle(dev->of_node, "phys", 0);
|
||||
np_conn = of_graph_get_remote_node(np_phy, -1, -1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user