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/

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9411

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9924 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Shaun Ruffell
2011-05-27 16:48:46 +00:00
parent fb35e6afd2
commit de59662acb
16 changed files with 13 additions and 42 deletions

View File

@@ -1285,6 +1285,10 @@ wait_for_completion_interruptible_timeout(struct completion *x,
const struct pci_device_id _x[] __devinitdata
#endif
#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