Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / drivers / scsi / aic7xxx / aic7xxx_proc.c
index 04a3506..5914b4a 100644 (file)
@@ -77,11 +77,9 @@ 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 < num_syncrates; i++) {
+       for (i = 0; i < ARRAY_SIZE(scsi_syncrates); i++) {
 
                if (period_factor == scsi_syncrates[i].period_factor) {
                        /* Period in kHz */