summaryrefslogtreecommitdiff
path: root/include/dahdi/kernel.h
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-09-24 22:44:53 +0000
committerShaun Ruffell <sruffell@digium.com>2010-09-24 22:44:53 +0000
commit136185314551006bd4e03e359537678b4ab5c5ac (patch)
treeeaba3cdebac7179a46a49b0c58a5beb26962d894 /include/dahdi/kernel.h
parent0e0506b6f312affc011e52e9ae6079355103cf04 (diff)
Move test for DEFINE_SPINLOCK into include/dahdi/kernel.h
The check for DEFINE_SPINLOCK was spread throughout the source tree. If not defined we can just define it in inlucde/dahdi/kernel.h. Now include/dahdi/kernel.h is the only place that references SPIN_LOCK_UNLOCKED (which breaks lockdep checking if DEFINE_SPINLOCK is otherwise defined in the kernel). 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@9411 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include/dahdi/kernel.h')
-rw-r--r--include/dahdi/kernel.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index 7e4e254..597e139 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -1262,6 +1262,10 @@ wait_for_completion_timeout(struct completion *x, unsigned long timeout)
#endif /* 2.6.26 */
#endif /* 2.6.31 */
+#ifndef DEFINE_SPINLOCK
+#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
+#endif
+
#ifndef DMA_BIT_MASK
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
#endif