diff options
-rwxr-xr-x | tor2.c | 4 | ||||
-rwxr-xr-x | torisa.c | 4 | ||||
-rwxr-xr-x | zaptel.c | 11 | ||||
-rwxr-xr-x | ztd-eth.c | 5 | ||||
-rwxr-xr-x | ztdummy.c | 4 | ||||
-rwxr-xr-x | ztdynamic.c | 6 |
6 files changed, 30 insertions, 4 deletions
@@ -1087,7 +1087,11 @@ static void tor2_tasklet(unsigned long data) 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) { @@ -130,7 +130,11 @@ static int prefmaster = 0; 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]; @@ -329,9 +329,13 @@ static struct zt_timer { 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 @@ u_char __zt_lin2a[16384]; 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]; @@ -50,8 +50,11 @@ struct ztdeth_header { /* 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]; @@ -152,7 +152,11 @@ int init_module(void) { #ifndef LINUX26 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 --git a/ztdynamic.c b/ztdynamic.c index b652ae7..92045e3 100755 --- a/ztdynamic.c +++ b/ztdynamic.c @@ -126,9 +126,11 @@ static struct zt_dynamic_driver *drivers = NULL; 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) { |