summaryrefslogtreecommitdiff
path: root/drivers/dahdi/dahdi_dynamic_ethmf.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-05-27 16:48:46 +0000
committerShaun Ruffell <sruffell@digium.com>2011-05-27 16:48:46 +0000
commit77044a1c6aab6f7466a41d3c7d6e9e4ad74aeda0 (patch)
tree39474212bad29107a07152065d647f605f9b933e /drivers/dahdi/dahdi_dynamic_ethmf.c
parent5ea94a2c36bf4621bcc702e92d5f7d8d39efa825 (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/ 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
Diffstat (limited to 'drivers/dahdi/dahdi_dynamic_ethmf.c')
-rw-r--r--drivers/dahdi/dahdi_dynamic_ethmf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/dahdi/dahdi_dynamic_ethmf.c b/drivers/dahdi/dahdi_dynamic_ethmf.c
index f8670c8..126001f 100644
--- a/drivers/dahdi/dahdi_dynamic_ethmf.c
+++ b/drivers/dahdi/dahdi_dynamic_ethmf.c
@@ -129,11 +129,7 @@ struct ztdeth {
/**
* Lock for adding and removing items in ethmf_list
*/
-#ifdef DEFINE_SPINLOCK
static DEFINE_SPINLOCK(ethmf_lock);
-#else
-static spinlock_t ethmf_lock = SPIN_LOCK_UNLOCKED;
-#endif
/**
* The active list of all running spans
@@ -401,7 +397,7 @@ static int ztdethmf_transmit(void *pvt, unsigned char *msg, int msglen)
unsigned char addr[ETH_ALEN];
int spans_ready = 0, index = 0;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
- static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(lock);
unsigned long flags;
#endif