Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e5a523a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "xhci-plat: Use correct dev to get usb-phy handle"

parents b6eac3b1 4cb2c7cc
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
{
	const struct of_device_id *match;
	const struct hc_driver	*driver;
	struct device		*sysdev;
	struct device		*sysdev, *phydev;
	struct xhci_hcd		*xhci;
	struct resource         *res;
	struct usb_hcd		*hcd;
@@ -220,6 +220,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
	 * 3. xhci_plat is grandchild of a pci device (dwc3-pci)
	 */
	sysdev = &pdev->dev;
	phydev = &pdev->dev;
	if (sysdev->parent && !sysdev->of_node && sysdev->parent->of_node)
		phydev = sysdev->parent;
	/*
	 * If sysdev->parent->parent is available and part of IOMMU group
	 * (indicating possible usage of SMMU enablement), then use
@@ -327,7 +330,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
	if (device_property_read_u32(&pdev->dev, "usb-core-id", &xhci->core_id))
		xhci->core_id = -EINVAL;

	hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0);
	hcd->usb_phy = devm_usb_get_phy_by_phandle(phydev, "usb-phy", 0);
	if (IS_ERR(hcd->usb_phy)) {
		ret = PTR_ERR(hcd->usb_phy);
		if (ret == -EPROBE_DEFER)