summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvjagadish <vjagadish@nvidia.com>2011-10-17 14:14:58 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:25 -0800
commit230b1f25e0616503ac5866729bbae19109305803 (patch)
treedc8120165d1acb8fd5fbe077961f7a5d1d4a9121
parent3c252892a2a832b2a682110c7bcf10ba3411bba0 (diff)
usb: host: tegra: Fix for possible race condition in timer handler
Acquire the spin lock before disabling the clock. Bug 876433 Change-Id: Iddb39761cb85e5f4c45061f3b2753d7b0fa64944 Reviewed-on: http://git-master/r/58343 Reviewed-by: Venkata Jagadish <vjagadish@nvidia.com> Tested-by: Venkata Jagadish <vjagadish@nvidia.com> Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Rebase-Id: Rda16e8bd08be58b6a3304b8cc3a7520417b341d4
-rw-r--r--drivers/usb/host/ehci-tegra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 196bd4c7baeb..19383e3fd3a8 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -933,12 +933,12 @@ static void clk_timer_work_handler(struct work_struct* clk_timer_work) {
spin_unlock_irqrestore(&tegra->ehci->lock, flags);
if (timer_event) {
- clk_disable(tegra->emc_clk);
- clk_disable(tegra->sclk_clk);
spin_lock_irqsave(&tegra->ehci->lock, flags);
tegra->clock_enabled = 0;
tegra->timer_event = 0;
spin_unlock_irqrestore(&tegra->ehci->lock, flags);
+ clk_disable(tegra->emc_clk);
+ clk_disable(tegra->sclk_clk);
return;
}