summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-01-03 18:26:34 +0000
committerShaun Ruffell <sruffell@digium.com>2011-01-03 18:26:34 +0000
commit4aea9102e00159077ff5df3c584159495880ea54 (patch)
tree22982b06410a1057a6e03ae93a49ee47f6910bf4 /drivers
parentb5aef822a088200675fdefc60912179e1e367fef (diff)
dahdi: Trivial move of sync_tick callback to inline function.
This is a trivial cleanup to primarily to remove the #ifdef test out of process_masterspan. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9586 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dahdi/dahdi-base.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index a896f63..f1b6ff2 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -8526,6 +8526,16 @@ static inline void pseudo_rx_audio(struct dahdi_chan *chan)
}
#endif /* CONFIG_DAHDI_MIRROR */
+#ifdef DAHDI_SYNC_TICK
+static inline void dahdi_sync_tick(struct dahdi_span *const s)
+{
+ if (s->ops->sync_tick)
+ s->ops->sync_tick(s, s == master);
+}
+#else
+#define dahdi_sync_tick(x) do { ; } while (0)
+#endif
+
static void process_masterspan(void)
{
unsigned long flags;
@@ -8597,10 +8607,8 @@ static void process_masterspan(void)
__buf_push(&chan->confout, NULL);
spin_unlock(&chan->lock);
}
-#ifdef DAHDI_SYNC_TICK
- if (s->ops->sync_tick)
- s->ops->sync_tick(s, s == master);
-#endif
+
+ dahdi_sync_tick(s);
}
spin_unlock_irqrestore(&chan_lock, flags);
}