summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-02-03 21:37:56 +0000
committerShaun Ruffell <sruffell@digium.com>2010-02-03 21:37:56 +0000
commitea3be9d2f30f991e60a3b5999861f3f7f4dbfb0d (patch)
treed584c1aaa276d701f28daaeff300fe42c1c8b1a0
parent208e0ba531dd47d944b4c425a021489564a749d4 (diff)
wctdm24xxp: Localize fxo_addrs array reference.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7982 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 0b7d6aa..2fc07b4 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -197,7 +197,6 @@ static int _opermode = 0;
static char *opermode = "FCC";
static int fxshonormode = 0;
static int alawoverride = 0;
-static int fxo_addrs[4] = { 0x00, 0x08, 0x04, 0x0c };
static int fxotxgain = 0;
static int fxorxgain = 0;
static int fxstxgain = 0;
@@ -637,10 +636,12 @@ static inline void cmd_dequeue(struct wctdm *wc, unsigned char *writechunk, int
writechunk[CMD_BYTE(card, 1, wc->altcs[card])] = 0x80 | ((curcmd >> 8) & 0x7f);
writechunk[CMD_BYTE(card, 2, wc->altcs[card])] = curcmd & 0xff;
} else if (wc->modtype[card] == MOD_TYPE_FXO) {
+ const int FXO_ADDRS[4] = { 0x00, 0x08, 0x04, 0x0c };
+ int idx = CMD_BYTE(card, 0, wc->altcs[card]);
if (curcmd & __CMD_WR)
- writechunk[CMD_BYTE(card, 0, wc->altcs[card])] = 0x20 | fxo_addrs[subaddr];
+ writechunk[idx] = 0x20 | FXO_ADDRS[subaddr];
else
- writechunk[CMD_BYTE(card, 0, wc->altcs[card])] = 0x60 | fxo_addrs[subaddr];
+ writechunk[idx] = 0x60 | FXO_ADDRS[subaddr];
writechunk[CMD_BYTE(card, 1, wc->altcs[card])] = (curcmd >> 8) & 0xff;
writechunk[CMD_BYTE(card, 2, wc->altcs[card])] = curcmd & 0xff;
} else if (wc->modtype[card] == MOD_TYPE_FXSINIT) {