ASoC: tegra-alt: Use spin_lock_irqsave in I2S ISR
Dipesh Gandhi [Wed, 24 Sep 2014 05:38:01 +0000 (10:38 +0530)]
Updating spin_lock_irq with spin_lock_irqsave to
restore interrupt state to one at time of locking.

Bug 200040174

Change-Id: I81d588e7e6200981e470605fb5462fbb1000dfcb
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/534089
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>

sound/soc/tegra-alt/tegra30_i2s_alt.c

index fa9da22..3566af0 100644 (file)
@@ -654,8 +654,9 @@ static irqreturn_t tegra30_i2s_interrupt_handler(int irq, void *data)
 
        struct device *dev = data;
        struct tegra30_i2s *i2s = dev_get_drvdata(data);
+       unsigned long flags;
 
-       spin_lock_irq(&i2s->int_lock);
+       spin_lock_irqsave(&i2s->int_lock, flags);
 
        if (tegra30_apbif_i2s_overrun_interrupt_status(dev->id)) {
                tegra30_apbif_i2s_overrun_interrupt_status_clear(dev->id);
@@ -665,7 +666,7 @@ static irqreturn_t tegra30_i2s_interrupt_handler(int irq, void *data)
                tegra30_i2s_soft_reset(i2s);
        }
 
-       spin_unlock_irq(&i2s->int_lock);
+       spin_unlock_irqrestore(&i2s->int_lock, flags);
 
        return IRQ_HANDLED;
 }