aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/aic7xxx/aic79xx_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_core.c')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index e14244aa69d..801fc81d0b2 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -59,7 +59,7 @@ char *ahd_chip_names[] =
"aic7902",
"aic7901A"
};
-static const u_int num_chip_names = NUM_ELEMENTS(ahd_chip_names);
+static const u_int num_chip_names = ARRAY_SIZE(ahd_chip_names);
/*
* Hardware error codes.
@@ -77,7 +77,7 @@ static struct ahd_hard_error_entry ahd_hard_errors[] = {
{ MPARERR, "Scratch or SCB Memory Parity Error" },
{ CIOPARERR, "CIOBUS Parity Error" },
};
-static const u_int num_errors = NUM_ELEMENTS(ahd_hard_errors);
+static const u_int num_errors = ARRAY_SIZE(ahd_hard_errors);
static struct ahd_phase_table_entry ahd_phase_table[] =
{
@@ -97,7 +97,7 @@ static struct ahd_phase_table_entry ahd_phase_table[] =
* In most cases we only wish to itterate over real phases, so
* exclude the last element from the count.
*/
-static const u_int num_phases = NUM_ELEMENTS(ahd_phase_table) - 1;
+static const u_int num_phases = ARRAY_SIZE(ahd_phase_table) - 1;
/* Our Sequencer Program */
#include "aic79xx_seq.h"
@@ -7259,7 +7259,7 @@ ahd_qinfifo_count(struct ahd_softc *ahd)
return (wrap_qinfifonext - wrap_qinpos);
else
return (wrap_qinfifonext
- + NUM_ELEMENTS(ahd->qinfifo) - wrap_qinpos);
+ + ARRAY_SIZE(ahd->qinfifo) - wrap_qinpos);
}
void
@@ -8619,7 +8619,7 @@ ahd_check_patch(struct ahd_softc *ahd, struct patch **start_patch,
struct patch *last_patch;
u_int num_patches;
- num_patches = sizeof(patches)/sizeof(struct patch);
+ num_patches = ARRAY_SIZE(patches);
last_patch = &patches[num_patches];
cur_patch = *start_patch;