summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/baseband.c
diff options
context:
space:
mode:
authorMalcolm Priestley2014-10-29 18:44:05 +0100
committerGreg Kroah-Hartman2014-10-29 21:31:31 +0100
commita9c049b86d937fb1be9eb485353b44e47b4fc41c (patch)
tree466ee3aa761eb783d9b5831e90ccdeffe16e33a0 /drivers/staging/vt6655/baseband.c
parentstaging: vt6655: device_init_registers replace spin lock (diff)
downloadkernel-qcow2-linux-a9c049b86d937fb1be9eb485353b44e47b4fc41c.tar.gz
kernel-qcow2-linux-a9c049b86d937fb1be9eb485353b44e47b4fc41c.tar.xz
kernel-qcow2-linux-a9c049b86d937fb1be9eb485353b44e47b4fc41c.zip
staging: vt6655: baseband.c timers replace spin lock
Use spin_lock_irqsave and spin_unlock_irqrestore in functions TimerSQ3CallBack and TimerState1CallBack Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/baseband.c')
-rw-r--r--drivers/staging/vt6655/baseband.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index 8adeea4da0ec..c7ad927084d7 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -2786,9 +2786,11 @@ TimerSQ3CallBack(
)
{
struct vnt_private *pDevice = hDeviceContext;
+ unsigned long flags;
pr_debug("TimerSQ3CallBack...\n");
- spin_lock_irq(&pDevice->lock);
+
+ spin_lock_irqsave(&pDevice->lock, flags);
pr_debug("3.[%08x][%08x], %d\n",
(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1,
@@ -2803,7 +2805,7 @@ TimerSQ3CallBack(
add_timer(&pDevice->TimerSQ3Tmax3);
add_timer(&pDevice->TimerSQ3Tmax2);
- spin_unlock_irq(&pDevice->lock);
+ spin_unlock_irqrestore(&pDevice->lock, flags);
}
/*+
@@ -2830,10 +2832,12 @@ TimerState1CallBack(
)
{
struct vnt_private *pDevice = hDeviceContext;
+ unsigned long flags;
pr_debug("TimerState1CallBack...\n");
- spin_lock_irq(&pDevice->lock);
+ spin_lock_irqsave(&pDevice->lock, flags);
+
if (pDevice->uDiversityCnt < pDevice->ulDiversityMValue/100) {
s_vChangeAntenna(pDevice);
pDevice->TimerSQ3Tmax3.expires = RUN_AT(pDevice->byTMax3 * HZ);
@@ -2864,5 +2868,6 @@ TimerState1CallBack(
}
pDevice->byAntennaState = 0;
BBvClearAntDivSQ3Value(pDevice);
- spin_unlock_irq(&pDevice->lock);
+
+ spin_unlock_irqrestore(&pDevice->lock, flags);
}