summaryrefslogtreecommitdiff
path: root/drivers/dahdi
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-09-24 22:45:03 +0000
committerShaun Ruffell <sruffell@digium.com>2010-09-24 22:45:03 +0000
commit4bfa83e22e4a0e445fe68465073df34c00481183 (patch)
treed7220f22e9c6ec8c3e11109a5df5ef13939dc7e7 /drivers/dahdi
parent0bf145124b00cffb42c65f15c788b1a2eb131085 (diff)
dahdi: process_timers is already called with interrupts disabled.
Very slight performance increase when timertest is running in the background. Measured at ~10 ns improvement over 10K samples. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Review: https://reviewboard.asterisk.org/r/940/ git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9413 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi')
-rw-r--r--drivers/dahdi/dahdi-base.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 40c1c12..417a09f 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -8162,11 +8162,12 @@ int dahdi_hdlc_getbuf(struct dahdi_chan *ss, unsigned char *bufptr, unsigned int
static void process_timers(void)
{
- unsigned long flags;
struct dahdi_timer *cur;
- spin_lock_irqsave(&dahdi_timer_lock, flags);
+ if (list_empty(&dahdi_timers))
+ return;
+ spin_lock(&dahdi_timer_lock);
list_for_each_entry(cur, &dahdi_timers, list) {
if (cur->ms) {
cur->pos -= DAHDI_CHUNKSIZE;
@@ -8177,8 +8178,7 @@ static void process_timers(void)
}
}
}
-
- spin_unlock_irqrestore(&dahdi_timer_lock, flags);
+ spin_unlock(&dahdi_timer_lock);
}
static unsigned int dahdi_timer_poll(struct file *file, struct poll_table_struct *wait_table)