[svn-commits] sruffell: linux/trunk r7982 - /linux/trunk/drivers/dahdi/wctdm24xxp/base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Feb 3 15:38:08 CST 2010
Author: sruffell
Date: Wed Feb 3 15:37:56 2010
New Revision: 7982
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7982
Log:
wctdm24xxp: Localize fxo_addrs array reference.
Modified:
linux/trunk/drivers/dahdi/wctdm24xxp/base.c
Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=7982&r1=7981&r2=7982
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Wed Feb 3 15:37:56 2010
@@ -197,7 +197,6 @@
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 @@
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) {
More information about the svn-commits
mailing list