From 9fa825fda1d65670344223701175a9dcb8545bce Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 14 Feb 2011 02:00:00 -0600 Subject: wctdm24xxp: Remove modmap member from 'struct wctdm'. We can already use the module type to determine presence of a module to check. Signed-off-by: Shaun Ruffell --- drivers/dahdi/wctdm24xxp/base.c | 25 ++++++++++--------------- drivers/dahdi/wctdm24xxp/wctdm24xxp.h | 1 - 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 003904d..7e1425a 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -1997,14 +1997,16 @@ static inline void wctdm_isr_misc(struct wctdm *wc) } for (x = 0; x < wc->mods_per_board; x++) { - if (wc->modmap & (1 << x)) { - if (wc->modtype[x] == MOD_TYPE_FXS) { - wctdm_isr_misc_fxs(wc, x); - } else if (wc->modtype[x] == MOD_TYPE_FXO) { - wctdm_voicedaa_check_hook(wc, x); - } else if (wc->modtype[x] == MOD_TYPE_QRV) { - wctdm_qrvdri_check_hook(wc, x); - } + switch (wc->modtype[x]) { + case MOD_TYPE_FXS: + wctdm_isr_misc_fxs(wc, x); + break; + case MOD_TYPE_FXO: + wctdm_voicedaa_check_hook(wc, x); + break; + case MOD_TYPE_QRV: + wctdm_qrvdri_check_hook(wc, x); + break; } } } @@ -3357,8 +3359,6 @@ static int wctdm_open(struct dahdi_chan *chan) channo = chan->chanpos - 1; #if 0 - if (!(wc->modmap & (1 << (chan->chanpos - 1)))) - return -ENODEV; if (wc->dead) return -ENODEV; #endif @@ -3892,7 +3892,6 @@ static int wctdm_identify_modules(struct wctdm *wc) break; retry: if (!(ret = wctdm_init_proslic(wc, x, 0, 0, sane))) { - wc->modmap |= (1 << x); if (debug & DEBUG_CARD) { readi = wctdm_getreg(wc,x,LOOP_I_LIMIT); dev_info(&wc->vb.pdev->dev, "Proslic module %d loop current is %dmA\n", x, ((readi*3)+20)); @@ -3903,7 +3902,6 @@ retry: sane = 1; /* Init with Manual Calibration */ if (!wctdm_init_proslic(wc, x, 0, 1, sane)) { - wc->modmap |= (1 << x); if (debug & DEBUG_CARD) { readi = wctdm_getreg(wc, x, LOOP_I_LIMIT); @@ -3916,17 +3914,14 @@ retry: } } else if (!(ret = wctdm_init_voicedaa(wc, x, 0, 0, sane))) { - wc->modmap |= (1 << x); dev_info(&wc->vb.pdev->dev, "Port %d: Installed -- AUTO FXO " "(%s mode)\n", x + 1, fxo_modes[_opermode].name); } else if (!wctdm_init_qrvdri(wc, x)) { - wc->modmap |= 1 << x; dev_info(&wc->vb.pdev->dev, "Port %d: Installed -- QRV DRI card\n", x + 1); } else if (is_hx8(wc) && !wctdm_init_b400m(wc, x)) { - wc->modmap |= (1 << x); dev_info(&wc->vb.pdev->dev, "Port %d: Installed -- BRI " "quad-span module\n", x + 1); diff --git a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h index 99d8159..5366bb9 100644 --- a/drivers/dahdi/wctdm24xxp/wctdm24xxp.h +++ b/drivers/dahdi/wctdm24xxp/wctdm24xxp.h @@ -170,7 +170,6 @@ struct wctdm { int mods_per_board; /* maximum number of modules for this board */ int digi_mods; /* number of digital modules present */ int avchannels; /* active "voice" (voice, B and D) channels */ - int modmap; /* Bit-map of present cards (1=present) */ int altcs[NUM_MODULES]; -- cgit v1.2.3