diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2013-03-03 00:51:24 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2013-03-03 00:51:24 +0100 |
commit | d6fa4ec20db6bd0b403d2d99fd9423e6c0f3f845 (patch) | |
tree | e9ddb16309d2b546a400593afc07846ce9ed6746 /drivers/usb/host/ehci-tegra.c | |
parent | dc1cfc34b2a07c5441d68ca21ae4296822ee4df6 (diff) | |
parent | 1ff6b9489fbc737e3e2bc7660b92cebbfaea5247 (diff) |
Conflicts:
arch/arm/mach-tegra/common.c
drivers/ata/ahci-tegra.c
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 13d96d3b1320..095447d9e3a2 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -522,6 +522,7 @@ static int tegra_ehci_probe(struct platform_device *pdev) struct resource *res; struct usb_hcd *hcd; struct tegra_ehci_hcd *tegra; + struct tegra_usb_platform_data *pdata = dev_get_platdata(&pdev->dev); int err = 0; int irq; @@ -592,13 +593,15 @@ static int tegra_ehci_probe(struct platform_device *pdev) goto fail_phy; } - err = enable_irq_wake(tegra->irq); - if (err < 0) { - dev_warn(&pdev->dev, - "Couldn't enable USB host mode wakeup, irq=%d, " - "error=%d\n", irq, err); - err = 0; - tegra->irq = 0; + if (pdata->u_data.host.remote_wakeup_supported) { + err = enable_irq_wake(tegra->irq); + if (err < 0) { + dev_warn(&pdev->dev, + "Couldn't enable USB host mode wakeup," + " irq=%d error=%d\n", irq, err); + err = 0; + tegra->irq = 0; + } } tegra->ehci = hcd_to_ehci(hcd); @@ -646,6 +649,7 @@ static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state) static int tegra_ehci_remove(struct platform_device *pdev) { struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); + struct tegra_usb_platform_data *pdata = dev_get_platdata(&pdev->dev); struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci); if (tegra == NULL || hcd == NULL) @@ -658,7 +662,7 @@ static int tegra_ehci_remove(struct platform_device *pdev) } #endif - if (tegra->irq) + if (tegra->irq && pdata->u_data.host.remote_wakeup_supported) disable_irq_wake(tegra->irq); /* Make sure phy is powered ON to access USB register */ |