[PATCH] Don't open-code spinlock initializer (was: [openib-general] Compile issue with 2.6.12 + realtime preemt patch)

Roland Dreier rolandd at cisco.com
Fri Jul 29 10:04:18 PDT 2005


Libor, I think you missed this patch the first time around.


Initialize spinlock with DEFINE_SPINLOCK() instead of
SPIN_LOCK_UNLOCKED to be friendly to CONFIG_PREEMPT_RT patches.

Signed-off-by: Roland Dreier <rolandd at cisco.com>

--- infiniband/ulp/sdp/sdp_conn.c	(revision 2904)
+++ infiniband/ulp/sdp/sdp_conn.c	(working copy)
@@ -46,7 +46,7 @@ static struct ib_client sdp_client = {
 	.remove = sdp_device_remove_one
 };
 
-static spinlock_t psn_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(psn_lock);
 static u32        psn_seed;
 
 /*



More information about the general mailing list