linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / scsi / aic7xxx / aic7xxx_proc.c
index 5914b4a..04a3506 100644 (file)
@@ -77,9 +77,11 @@ static u_int
 ahc_calc_syncsrate(u_int period_factor)
 {
        int i;
+       int num_syncrates;
 
+       num_syncrates = sizeof(scsi_syncrates) / sizeof(scsi_syncrates[0]);
        /* See if the period is in the "exception" table */
-       for (i = 0; i < ARRAY_SIZE(scsi_syncrates); i++) {
+       for (i = 0; i < num_syncrates; i++) {
 
                if (period_factor == scsi_syncrates[i].period_factor) {
                        /* Period in kHz */