]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/scsi/aic7xxx/aic79xx_proc.c
[SCSI] drivers/scsi: Use ARRAY_SIZE macro
[net-next-2.6.git] / drivers / scsi / aic7xxx / aic79xx_proc.c
index 39a27840fce66220935fba62116ff44072c92f94..24fd59a230bf490c980895ffc5dbbeb9beee38ac 100644 (file)
@@ -76,11 +76,9 @@ static u_int
 ahd_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 */