diff options
Diffstat (limited to 'kernel/wct4xxp/base.c')
-rw-r--r-- | kernel/wct4xxp/base.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/kernel/wct4xxp/base.c b/kernel/wct4xxp/base.c index b44747b..ec956c4 100644 --- a/kernel/wct4xxp/base.c +++ b/kernel/wct4xxp/base.c @@ -319,7 +319,6 @@ struct t4 { unsigned int passno; /* number of interrupt passes */ char *variety; int last0; /* for detecting double-missed IRQ */ - int checktiming; /* Set >0 to cause the timing source to be checked */ /* DMA related fields */ unsigned int dmactrl; @@ -1429,7 +1428,9 @@ static int t4_shutdown(struct zt_span *span) /* No longer in use, disable interrupts */ printk("TE%dXXP: Disabling interrupts since there are no active spans\n", wc->numspans); set_bit(T4_STOP_DMA, &wc->checkflag); - } else wc->checktiming = 1; + } else + set_bit(T4_CHECK_TIMING, &wc->checkflag); + spin_unlock_irqrestore(&wc->reglock, flags); /* Wait for interrupt routine to shut itself down */ @@ -1470,7 +1471,7 @@ static int t4_spanconfig(struct zt_span *span, struct zt_lineconfig *lc) wc->tspans[lc->sync - 1]->sync = span->spanno; wc->tspans[lc->sync - 1]->psync = span->offset + 1; } - wc->checktiming = 1; + set_bit(T4_CHECK_TIMING, &wc->checkflag); /* Make sure this is clear in case of multiple startup and shutdown * iterations */ @@ -1833,7 +1834,7 @@ found: } } } else - cards[0]->checktiming = 1; + set_bit(T4_CHECK_TIMING, &cards[0]->checkflag); #endif spin_unlock_irqrestore(&synclock, flags); return 0; @@ -1843,7 +1844,7 @@ static void __t4_set_timing_source_auto(struct t4 *wc) { int x; printk("timing source auto card %d!\n", wc->num); - wc->checktiming = 0; + clear_bit(T4_CHECK_TIMING, &wc->checkflag); if (timingcable) { __t4_findsync(wc); } else { @@ -2523,7 +2524,7 @@ static void t4_check_alarms(struct t4 *wc, int span) if (((!ts->span.alarms) && alarms) || (ts->span.alarms && (!alarms))) - wc->checktiming = 1; + set_bit(T4_CHECK_TIMING, &wc->checkflag); /* Keep track of recovering */ if ((!alarms) && ts->span.alarms) @@ -2887,7 +2888,7 @@ ZAP_IRQ_HANDLER(t4_interrupt) __handle_leds(wc); - if (wc->checktiming > 0) + if (test_bit(T4_CHECK_TIMING, &wc->checkflag)) __t4_set_timing_source_auto(wc); spin_unlock_irqrestore(&wc->reglock, flags); @@ -3027,7 +3028,7 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2) spin_lock(&wc->reglock); - if (unlikely(wc->checktiming > 0)) { + if (unlikely(test_bit(T4_CHECK_TIMING, &wc->checkflag))) { __t4_set_timing_source_auto(wc); } @@ -3532,7 +3533,7 @@ static int __devinit t4_launch(struct t4 *wc) return -1; } } - wc->checktiming = 1; + set_bit(T4_CHECK_TIMING, &wc->checkflag); spin_lock_irqsave(&wc->reglock, flags); __t4_set_timing_source(wc,4, 0, 0); spin_unlock_irqrestore(&wc->reglock, flags); |