aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_proc.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-06-09 01:23:48 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 11:45:30 -0400
commit6391a11375de5e2bb1eb8481e54619761dc65d9f (patch)
tree956aae1d278a3f731b2e6148ff40a69aa7957ea8 /drivers/scsi/aic7xxx/aic7xxx_proc.c
parent9dc399de0840a478adb71278becf598d3ab3aacc (diff)
[SCSI] drivers/scsi: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of the macro. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_proc.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_proc.c b/drivers/scsi/aic7xxx/aic7xxx_proc.c
index 04a3506cf340..5914b4aa4a8f 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_proc.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c
@@ -77,11 +77,9 @@ static u_int
77ahc_calc_syncsrate(u_int period_factor) 77ahc_calc_syncsrate(u_int period_factor)
78{ 78{
79 int i; 79 int i;
80 int num_syncrates;
81 80
82 num_syncrates = sizeof(scsi_syncrates) / sizeof(scsi_syncrates[0]);
83 /* See if the period is in the "exception" table */ 81 /* See if the period is in the "exception" table */
84 for (i = 0; i < num_syncrates; i++) { 82 for (i = 0; i < ARRAY_SIZE(scsi_syncrates); i++) {
85 83
86 if (period_factor == scsi_syncrates[i].period_factor) { 84 if (period_factor == scsi_syncrates[i].period_factor) {
87 /* Period in kHz */ 85 /* Period in kHz */