summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-04-04 16:14:53 +0000
committerShaun Ruffell <sruffell@digium.com>2010-04-04 16:14:53 +0000
commitb964d7907c776d74c638ad3862461094189d7db7 (patch)
tree2f983bdb80904801cc04efb0d2774ec48fae9333
parent6f86327a3541c1c3706c4d46c4412647ff77a540 (diff)
wcte12xp: Use ARRAY_SIZE in a couple more places
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8466 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wcte12xp/base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index 77d72c5..1ff0954 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -1362,14 +1362,14 @@ static int t1_software_init(struct t1 *wc)
struct pci_dev *pdev = wc->vb.pdev;
/* Find position */
- for (x = 0; x < sizeof(ifaces) / sizeof(ifaces[0]); x++) {
+ for (x = 0; x < ARRAY_SIZE(ifaces); ++x) {
if (ifaces[x] == wc) {
debug_printk(wc, 1, "software init for card %d\n", x);
break;
}
}
- if (x == sizeof(ifaces) / sizeof(ifaces[0]))
+ if (x == ARRAY_SIZE(ifaces))
return -1;
t4_serial_setup(wc);