From 77044a1c6aab6f7466a41d3c7d6e9e4ad74aeda0 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 27 May 2011 16:48:46 +0000 Subject: 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 Acked-by: Kinsey Moore Acked-by: Russ Meyerriecks Acked-by: Tzafrir Cohen 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 --- drivers/dahdi/xpp/xbus-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/dahdi/xpp/xbus-core.c') diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c index 542d578..ebc7cba 100644 --- a/drivers/dahdi/xpp/xbus-core.c +++ b/drivers/dahdi/xpp/xbus-core.c @@ -78,7 +78,7 @@ static void transport_init(xbus_t *xbus, struct xbus_ops *ops, ushort max_send_s static void transport_destroy(xbus_t *xbus); /* Data structures */ -static spinlock_t xbuses_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(xbuses_lock); #ifdef CONFIG_PROC_FS static struct proc_dir_entry *proc_xbuses = NULL; #endif @@ -405,7 +405,7 @@ xpacket_t *xframe_next_packet(xframe_t *frm, int len) return (xpacket_t *)(frm->packets + newlen - len); } -static spinlock_t serialize_dump_xframe = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(serialize_dump_xframe); static void do_hexdump(const char msg[], byte *data, uint16_t len) { -- cgit v1.2.3