aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pas16.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/pas16.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/pas16.c')
-rw-r--r--drivers/scsi/pas16.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c
index f09e94af9ade..1bf96ed8f935 100644
--- a/drivers/scsi/pas16.c
+++ b/drivers/scsi/pas16.c
@@ -156,7 +156,7 @@ static int default_irqs[] __initdata =
156static struct override { 156static struct override {
157 unsigned short io_port; 157 unsigned short io_port;
158 int irq; 158 int irq;
159} overrides 159} overrides
160#ifdef PAS16_OVERRIDE 160#ifdef PAS16_OVERRIDE
161 [] __initdata = PAS16_OVERRIDE; 161 [] __initdata = PAS16_OVERRIDE;
162#else 162#else
@@ -164,19 +164,19 @@ static struct override {
164 {0,IRQ_AUTO}}; 164 {0,IRQ_AUTO}};
165#endif 165#endif
166 166
167#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) 167#define NO_OVERRIDES ARRAY_SIZE(overrides)
168 168
169static struct base { 169static struct base {
170 unsigned short io_port; 170 unsigned short io_port;
171 int noauto; 171 int noauto;
172} bases[] __initdata = 172} bases[] __initdata =
173 { {PAS16_DEFAULT_BASE_1, 0}, 173 { {PAS16_DEFAULT_BASE_1, 0},
174 {PAS16_DEFAULT_BASE_2, 0}, 174 {PAS16_DEFAULT_BASE_2, 0},
175 {PAS16_DEFAULT_BASE_3, 0}, 175 {PAS16_DEFAULT_BASE_3, 0},
176 {PAS16_DEFAULT_BASE_4, 0} 176 {PAS16_DEFAULT_BASE_4, 0}
177 }; 177 };
178 178
179#define NO_BASES (sizeof (bases) / sizeof (struct base)) 179#define NO_BASES ARRAY_SIZE(bases)
180 180
181static const unsigned short pas16_offset[ 8 ] = 181static const unsigned short pas16_offset[ 8 ] =
182 { 182 {