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); } diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 4c1452c..a1424c4 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -791,7 +791,8 @@ struct dahdi_span_ops { int (*maint)(struct dahdi_span *span, int mode); #ifdef DAHDI_SYNC_TICK - /*! Opt: send sync to spans */ + /*! Opt: send sync to spans. Called in hard_irq context with chan_lock + * held.*/ int (*sync_tick)(struct dahdi_span *span, int is_master); #endif /* ==== Channel Callback Operations ==== */