diff options
author | Robert Baldyga <r.baldyga@samsung.com> | 2015-02-23 12:32:19 +0100 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:42:14 +0900 |
commit | 4f3d93c83eb98a238123909104857ea14ed887c4 (patch) | |
tree | 815d3a9cbfd7320fe52f3c1fa8a54a10be10653f /drivers/usb/dwc3 | |
parent | 92ba8b136594a78372fa9e30b32af5fb38fdc27e (diff) |
LOCAL / dwc3: host: don't add xhci device only if in OTG mode
OTG handling code adds xhci device automaticaly when USB host cable
is detected.
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/host.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index c679f63783ae..4b07f13889e9 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -62,10 +62,12 @@ int dwc3_host_init(struct dwc3 *dwc) phy_create_lookup(dwc->usb3_generic_phy, "usb3-phy", dev_name(&xhci->dev)); - ret = platform_device_add(xhci); - if (ret) { - dev_err(dwc->dev, "failed to register xHCI device\n"); - goto err2; + if (!dwc->dotg) { + ret = platform_device_add(xhci); + if (ret) { + dev_err(dwc->dev, "failed to register xHCI device\n"); + goto err2; + } } return 0; |