From 99345afd604d63f2e742f3cfb63d465538aac27a Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 1 Aug 2010 12:23:37 +0300 Subject: move d-chan initialization outside of chans loop Move some initializations of the span that are specific to the D-channel outside of the channel-speicific loop. --- drivers/dahdi/zaphfc/base.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/dahdi/zaphfc/base.c b/drivers/dahdi/zaphfc/base.c index 6adabfd..68523e2 100644 --- a/drivers/dahdi/zaphfc/base.c +++ b/drivers/dahdi/zaphfc/base.c @@ -700,9 +700,6 @@ static int hfc_zap_initialize(struct dahdi_hfc *hfccard) if (i == hfccard->span.channels - 1) { hfccard->chans[i].sigcap = DAHDI_SIG_HARDHDLC; - hfccard->sigchan = &hfccard->chans[D]; - hfccard->sigactive = 0; - atomic_set(&hfccard->hdlc_pending, 0); } else { hfccard->chans[i].sigcap = DAHDI_SIG_CLEAR | DAHDI_SIG_DACS; @@ -711,6 +708,10 @@ static int hfc_zap_initialize(struct dahdi_hfc *hfccard) hfccard->chans[i].chanpos = i + 1; } + hfccard->sigchan = &hfccard->chans[D]; + hfccard->sigactive = 0; + atomic_set(&hfccard->hdlc_pending, 0); + hfccard->chans[DAHDI_D].readchunk = hfctmp->chans[D].rx.zaptel_buffer; -- cgit v1.2.3