diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-06-09 01:23:48 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-10 11:45:30 -0400 |
commit | 6391a11375de5e2bb1eb8481e54619761dc65d9f (patch) | |
tree | 956aae1d278a3f731b2e6148ff40a69aa7957ea8 /drivers/scsi/NCR53c406a.c | |
parent | 9dc399de0840a478adb71278becf598d3ab3aacc (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/NCR53c406a.c')
-rw-r--r-- | drivers/scsi/NCR53c406a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c index ae37d3ab9c4a..8472c5359023 100644 --- a/drivers/scsi/NCR53c406a.c +++ b/drivers/scsi/NCR53c406a.c | |||
@@ -213,16 +213,16 @@ static void *addresses[] = { | |||
213 | (void *) 0xd8000, | 213 | (void *) 0xd8000, |
214 | (void *) 0xc8000 | 214 | (void *) 0xc8000 |
215 | }; | 215 | }; |
216 | #define ADDRESS_COUNT (sizeof( addresses ) / sizeof( unsigned )) | 216 | #define ADDRESS_COUNT ARRAY_SIZE(addresses) |
217 | #endif /* USE_BIOS */ | 217 | #endif /* USE_BIOS */ |
218 | 218 | ||
219 | /* possible i/o port addresses */ | 219 | /* possible i/o port addresses */ |
220 | static unsigned short ports[] = { 0x230, 0x330, 0x280, 0x290, 0x330, 0x340, 0x300, 0x310, 0x348, 0x350 }; | 220 | static unsigned short ports[] = { 0x230, 0x330, 0x280, 0x290, 0x330, 0x340, 0x300, 0x310, 0x348, 0x350 }; |
221 | #define PORT_COUNT (sizeof( ports ) / sizeof( unsigned short )) | 221 | #define PORT_COUNT ARRAY_SIZE(ports) |
222 | 222 | ||
223 | /* possible interrupt channels */ | 223 | /* possible interrupt channels */ |
224 | static unsigned short intrs[] = { 10, 11, 12, 15 }; | 224 | static unsigned short intrs[] = { 10, 11, 12, 15 }; |
225 | #define INTR_COUNT (sizeof( intrs ) / sizeof( unsigned short )) | 225 | #define INTR_COUNT ARRAY_SIZE(intrs) |
226 | 226 | ||
227 | /* signatures for NCR 53c406a based controllers */ | 227 | /* signatures for NCR 53c406a based controllers */ |
228 | #if USE_BIOS | 228 | #if USE_BIOS |
@@ -236,7 +236,7 @@ struct signature { | |||
236 | { | 236 | { |
237 | "Copyright (C) Acculogic, Inc.\r\n2.8M Diskette Extension Bios ver 4.04.03 03/01/1993", 61, 82},}; | 237 | "Copyright (C) Acculogic, Inc.\r\n2.8M Diskette Extension Bios ver 4.04.03 03/01/1993", 61, 82},}; |
238 | 238 | ||
239 | #define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature )) | 239 | #define SIGNATURE_COUNT ARRAY_SIZE(signatures) |
240 | #endif /* USE_BIOS */ | 240 | #endif /* USE_BIOS */ |
241 | 241 | ||
242 | /* ============================================================ */ | 242 | /* ============================================================ */ |