diff -ur zaptel.orig/tor2.c zaptel.rt/tor2.c --- zaptel.orig/tor2.c 2005-08-07 23:43:02.000000000 -0700 +++ zaptel.rt/tor2.c 2005-08-31 11:57:58.000000000 -0700 @@ -1106,7 +1106,11 @@ static int syncsrc = 0; static int syncnum = 0 /* -1 */; static int syncspan = 0; +#ifdef DEFINE_SPINLOCK +static DEFINE_SPINLOCK(synclock); +#else static spinlock_t synclock = SPIN_LOCK_UNLOCKED; +#endif static int tor2_findsync(struct tor2 *tor) { diff -ur zaptel.orig/torisa.c zaptel.rt/torisa.c --- zaptel.orig/torisa.c 2005-01-15 14:59:18.000000000 -0800 +++ zaptel.rt/torisa.c 2005-08-31 11:57:39.000000000 -0700 @@ -130,7 +130,11 @@ static int spansstarted = 0; +#ifdef DEFINE_RWLOCK +static DEFINE_RWLOCK(torisa); +#else static rwlock_t torisa = RW_LOCK_UNLOCKED; +#endif static u_char readdata[2][64][ZT_MAX_CHUNKSIZE]; static u_char writedata[2][64][ZT_MAX_CHUNKSIZE]; diff -ur zaptel.orig/zaptel.c zaptel.rt/zaptel.c --- zaptel.orig/zaptel.c 2005-08-26 09:40:29.000000000 -0700 +++ zaptel.rt/zaptel.c 2005-08-31 12:00:04.000000000 -0700 @@ -329,9 +329,13 @@ wait_queue_head_t sel; } *zaptimers = NULL; +#ifdef DEFINE_SPINLOCK +static DEFINE_SPINLOCK(zaptimerlock); +static DEFINE_SPINLOCK(bigzaplock); +#else static spinlock_t zaptimerlock = SPIN_LOCK_UNLOCKED; - static spinlock_t bigzaplock = SPIN_LOCK_UNLOCKED; +#endif struct zt_zone { char name[40]; /* Informational, only */ @@ -364,8 +368,13 @@ static u_char defgain[256]; +#ifdef DEFINE_RWLOCK +static DEFINE_RWLOCK(zone_lock); +static DEFINE_RWLOCK(chan_lock); +#else static rwlock_t zone_lock = RW_LOCK_UNLOCKED; static rwlock_t chan_lock = RW_LOCK_UNLOCKED; +#endif static struct zt_zone *tone_zones[ZT_TONE_ZONE_MAX]; diff -ur zaptel.orig/ztd-eth.c zaptel.rt/ztd-eth.c --- zaptel.orig/ztd-eth.c 2004-10-12 20:36:01.000000000 -0700 +++ zaptel.rt/ztd-eth.c 2005-08-31 12:00:39.000000000 -0700 @@ -50,8 +50,11 @@ /* We take the raw message, put it in an ethernet frame, and add a two byte addressing header at the top for future use */ - +#ifdef DEFINE_SPINLOCK +static DEFINE_SPINLOCK(zlock); +#else static spinlock_t zlock = SPIN_LOCK_UNLOCKED; +#endif static struct ztdeth { unsigned char addr[ETH_ALEN]; diff -ur zaptel.orig/ztd-loc.c zaptel.rt/ztd-loc.c --- zaptel.orig/ztd-loc.c 2004-12-03 20:19:41.000000000 -0800 +++ zaptel.rt/ztd-loc.c 2005-08-31 11:54:00.000000000 -0700 @@ -66,7 +66,11 @@ #include #endif +#ifdef DEFINE_SPINLOCK +static DEFINE_SPINLOCK(zlock); +#else static spinlock_t zlock = SPIN_LOCK_UNLOCKED; +#endif static struct ztdlocal { unsigned short key; diff -ur zaptel.orig/ztdummy.c zaptel.rt/ztdummy.c --- zaptel.orig/ztdummy.c 2005-07-11 05:44:28.000000000 -0700 +++ zaptel.rt/ztdummy.c 2005-08-31 11:52:03.000000000 -0700 @@ -200,7 +200,11 @@ #endif #else int irq; +#ifdef DEFINE_SPINLOCK + DEFINE_SPINLOCK(mylock); +#else spinlock_t mylock = SPIN_LOCK_UNLOCKED; +#endif if (uhci_devices==NULL){ printk ("ztdummy: Uhci_devices pointer error.\n"); diff -ur zaptel.orig/ztdynamic.c zaptel.rt/ztdynamic.c --- zaptel.orig/ztdynamic.c 2005-08-08 07:26:34.000000000 -0700 +++ zaptel.rt/ztdynamic.c 2005-08-31 11:51:51.000000000 -0700 @@ -126,9 +126,11 @@ static int debug = 0; static int hasmaster = 0; - +#ifdef DEFINE_SPINLOCK +static DEFINE_SPINLOCK(dlock); +#else static spinlock_t dlock = SPIN_LOCK_UNLOCKED; - +#endif static void checkmaster(void) {