summaryrefslogtreecommitdiff
path: root/drivers/usb/otg/tegra-otg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/otg/tegra-otg.c')
-rw-r--r--drivers/usb/otg/tegra-otg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c
index 22e303ede24e..12c359bcbe46 100644
--- a/drivers/usb/otg/tegra-otg.c
+++ b/drivers/usb/otg/tegra-otg.c
@@ -173,8 +173,6 @@ static void tegra_stop_host(struct tegra_otg_data *tegra)
if (pdev) {
/* unregister host from otg */
- kfree(pdev->dev.platform_data);
- pdev->dev.platform_data = NULL;
platform_device_unregister(pdev);
tegra->pdev = NULL;
}
@@ -472,12 +470,14 @@ static int tegra_otg_probe(struct platform_device *pdev)
goto err_irq;
}
- err = enable_irq_wake(tegra->irq);
- if (err < 0) {
- dev_warn(&pdev->dev,
- "Couldn't enable USB otg mode wakeup, irq=%d, error=%d\n",
- tegra->irq, err);
- err = 0;
+ if (pdata->ehci_pdata->u_data.host.remote_wakeup_supported) {
+ err = enable_irq_wake(tegra->irq);
+ if (err < 0) {
+ dev_warn(&pdev->dev,
+ "Couldn't enable USB otg mode wakeup,"
+ " irq=%d, error=%d\n", tegra->irq, err);
+ err = 0;
+ }
}
INIT_WORK(&tegra->work, irq_work);