aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dtc.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/dtc.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/dtc.c')
-rw-r--r--drivers/scsi/dtc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c
index 310d2f488668..c5108c8c887b 100644
--- a/drivers/scsi/dtc.c
+++ b/drivers/scsi/dtc.c
@@ -145,35 +145,35 @@ static struct override {
1450, IRQ_AUTO}}; 1450, IRQ_AUTO}};
146#endif 146#endif
147 147
148#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) 148#define NO_OVERRIDES ARRAY_SIZE(overrides)
149 149
150static struct base { 150static struct base {
151 unsigned long address; 151 unsigned long address;
152 int noauto; 152 int noauto;
153} bases[] __initdata = { 153} bases[] __initdata = {
154 { 0xcc000, 0 }, 154 { 0xcc000, 0 },
155 { 0xc8000, 0 }, 155 { 0xc8000, 0 },
156 { 0xdc000, 0 }, 156 { 0xdc000, 0 },
157 { 0xd8000, 0 } 157 { 0xd8000, 0 }
158}; 158};
159 159
160#define NO_BASES (sizeof (bases) / sizeof (struct base)) 160#define NO_BASES ARRAY_SIZE(bases)
161 161
162static const struct signature { 162static const struct signature {
163 const char *string; 163 const char *string;
164 int offset; 164 int offset;
165} signatures[] = { 165} signatures[] = {
166 {"DATA TECHNOLOGY CORPORATION BIOS", 0x25}, 166 {"DATA TECHNOLOGY CORPORATION BIOS", 0x25},
167}; 167};
168 168
169#define NO_SIGNATURES (sizeof (signatures) / sizeof (struct signature)) 169#define NO_SIGNATURES ARRAY_SIZE(signatures)
170 170
171#ifndef MODULE 171#ifndef MODULE
172/* 172/*
173 * Function : dtc_setup(char *str, int *ints) 173 * Function : dtc_setup(char *str, int *ints)
174 * 174 *
175 * Purpose : LILO command line initialization of the overrides array, 175 * Purpose : LILO command line initialization of the overrides array,
176 * 176 *
177 * Inputs : str - unused, ints - array of integer parameters with ints[0] 177 * Inputs : str - unused, ints - array of integer parameters with ints[0]
178 * equal to the number of ints. 178 * equal to the number of ints.
179 * 179 *