MLK-24527-5 usb: dwc3: host: pass xhci_plat_priv to xhci plat
Since dwc3 glue layer may have its xhci_plat_priv, so pass to xhci plat driver to handle it. Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com> (cherry picked from commit 38f26c0e7ddb9190de2e21fc927ca0567b9ceaea)5.4-rM2-2.2.x-imx-squashed
parent
69c89fea57
commit
27dfd22242
|
@ -89,6 +89,7 @@ int dwc3_host_init(struct dwc3 *dwc)
|
|||
int ret, irq;
|
||||
struct resource *res;
|
||||
struct platform_device *dwc3_pdev = to_platform_device(dwc->dev);
|
||||
struct dwc3_platform_data *dwc3_pdata;
|
||||
int prop_idx = 0;
|
||||
|
||||
/*
|
||||
|
@ -161,6 +162,14 @@ int dwc3_host_init(struct dwc3 *dwc)
|
|||
}
|
||||
}
|
||||
|
||||
dwc3_pdata = (struct dwc3_platform_data *)dev_get_platdata(dwc->dev);
|
||||
if (dwc3_pdata && dwc3_pdata->xhci_priv) {
|
||||
ret = platform_device_add_data(xhci, dwc3_pdata->xhci_priv,
|
||||
sizeof(struct xhci_plat_priv));
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = platform_device_add(xhci);
|
||||
if (ret) {
|
||||
dev_err(dwc->dev, "failed to register xHCI device\n");
|
||||
|
|
Loading…
Reference in New Issue