Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364851
b: refs/heads/master
c: 2871782
h: refs/heads/master
i:
  364849: 7da4860
  364847: 41e295b
v: v3
  • Loading branch information
Thomas Abraham authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent 3db2779 commit c04d3e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8a261b59c8c6014d7dc984811ec81f14ef6f767
refs/heads/master: 2871782ae1cbca372eabf599576d611d861310e6
11 changes: 9 additions & 2 deletions trunk/drivers/usb/host/ohci-exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void exynos_ohci_phy_enable(struct exynos_ohci_hcd *exynos_ohci)

if (exynos_ohci->phy)
usb_phy_init(exynos_ohci->phy);
else if (exynos_ohci->pdata->phy_init)
else if (exynos_ohci->pdata && exynos_ohci->pdata->phy_init)
exynos_ohci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST);
}

Expand All @@ -44,7 +44,7 @@ static void exynos_ohci_phy_disable(struct exynos_ohci_hcd *exynos_ohci)

if (exynos_ohci->phy)
usb_phy_shutdown(exynos_ohci->phy);
else if (exynos_ohci->pdata->phy_exit)
else if (exynos_ohci->pdata && exynos_ohci->pdata->phy_exit)
exynos_ohci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
}

Expand Down Expand Up @@ -127,6 +127,10 @@ static int exynos_ohci_probe(struct platform_device *pdev)
if (!exynos_ohci)
return -ENOMEM;

if (of_device_is_compatible(pdev->dev.of_node,
"samsung,exynos5440-ohci"))
goto skip_phy;

phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
if (IS_ERR(phy)) {
/* Fallback to pdata */
Expand All @@ -141,6 +145,8 @@ static int exynos_ohci_probe(struct platform_device *pdev)
exynos_ohci->otg = phy->otg;
}

skip_phy:

exynos_ohci->dev = &pdev->dev;

hcd = usb_create_hcd(&exynos_ohci_hc_driver, &pdev->dev,
Expand Down Expand Up @@ -311,6 +317,7 @@ static const struct dev_pm_ops exynos_ohci_pm_ops = {
#ifdef CONFIG_OF
static const struct of_device_id exynos_ohci_match[] = {
{ .compatible = "samsung,exynos4210-ohci" },
{ .compatible = "samsung,exynos5440-ohci" },
{},
};
MODULE_DEVICE_TABLE(of, exynos_ohci_match);
Expand Down

0 comments on commit c04d3e6

Please sign in to comment.