[svn-commits] sruffell: linux/trunk r9586 - in /linux/trunk: drivers/dahdi/ include/dahdi/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Jan 3 18:26:38 UTC 2011
Author: sruffell
Date: Mon Jan 3 12:26:34 2011
New Revision: 9586
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9586
Log:
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 at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
linux/trunk/include/dahdi/kernel.h
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9586&r1=9585&r2=9586
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Jan 3 12:26:34 2011
@@ -8526,6 +8526,16 @@
}
#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 @@
__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);
}
Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=9586&r1=9585&r2=9586
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Mon Jan 3 12:26:34 2011
@@ -791,7 +791,8 @@
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 ==== */
More information about the svn-commits
mailing list