diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2011-12-13 18:27:46 +0900 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-15 13:58:05 +0530 |
commit | 063be27bc839bb5a898c09df06d88c9598297be4 (patch) | |
tree | 3fc58d88b4066c24da28ca2a74b97f1eaaa8896b /drivers/usb | |
parent | 599e03383493f7a15c46730a85458465467dddeb (diff) |
usb: tegra: don't disable irq wake if probe failed
Set tegra->irq to 0 if the ehci irq cannot be used as a wake source and
do not disable it when removing the ehci to avoid unbalanced irq wake
enable/disable problem.
Bug 884315
Change-Id: I9abf9f5f28d61b71d8a96b6ffcbb5ba6d899b3c0
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-on: http://git-master/r/69716
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 02762e833e75..5da5a8f0de99 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -1138,6 +1138,7 @@ static int tegra_ehci_probe(struct platform_device *pdev) "Couldn't enable USB host mode wakeup, irq=%d, " "error=%d\n", tegra->irq, err); err = 0; + tegra->irq = 0; } return err; @@ -1233,7 +1234,8 @@ static int tegra_ehci_remove(struct platform_device *pdev) /* Turn Off Interrupts */ ehci_writel(tegra->ehci, 0, &tegra->ehci->regs->intr_enable); clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); - disable_irq_wake(tegra->irq); + if (tegra->irq) + disable_irq_wake(tegra->irq); usb_remove_hcd(hcd); usb_put_hcd(hcd); cancel_delayed_work(&tegra->work); |