* [patch] hpani: using the wrong variable
@ 2010-03-28 11:48 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-03-28 11:48 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Randy Dunlap, devel, linux-kernel, kernel-janitors
We're updating the "HpPriv->ani" array here so we should use that to
determine the end of the for loop. "HpPriv->ani" has 50 elements and
"wd->regulationTable.allowChannel" has 59 elements.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/otus/hal/hpani.c b/drivers/staging/otus/hal/hpani.c
index 0afecd8..d401504 100644
--- a/drivers/staging/otus/hal/hpani.c
+++ b/drivers/staging/otus/hal/hpani.c
@@ -96,7 +96,7 @@ void zfHpAniAttach(zdev_t* dev)
HpPriv->hasHwPhyCounters = 1;
memset((char *)&HpPriv->ani, 0, sizeof(HpPriv->ani));
- for (i = 0; i < N(wd->regulationTable.allowChannel); i++)
+ for (i = 0; i < ARRAY_SIZE(HpPriv->ani); i++)
{
/* New ANI stuff */
HpPriv->ani[i].ofdmTrigHigh = ZM_HAL_ANI_OFDM_TRIG_HIGH;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-28 11:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-28 11:48 [patch] hpani: using the wrong variable Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox