aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-01-09 23:54:02 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:56 -0500
commitfe971071a89c5c5184fc9f3482c7a8e997cf0520 (patch)
tree74a29e80d5636255f33c750482497a32d8d3491f /drivers/char/synclink.c
parent3c6bee1d4037a5c569f30d40bd852a57ba250912 (diff)
[PATCH] drivers/char: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/synclink.c')
-rw-r--r--drivers/char/synclink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index 62aa0e534a6d..789572fc002b 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -7058,7 +7058,7 @@ static BOOLEAN mgsl_register_test( struct mgsl_struct *info )
7058{ 7058{
7059 static unsigned short BitPatterns[] = 7059 static unsigned short BitPatterns[] =
7060 { 0x0000, 0xffff, 0xaaaa, 0x5555, 0x1234, 0x6969, 0x9696, 0x0f0f }; 7060 { 0x0000, 0xffff, 0xaaaa, 0x5555, 0x1234, 0x6969, 0x9696, 0x0f0f };
7061 static unsigned int Patterncount = sizeof(BitPatterns)/sizeof(unsigned short); 7061 static unsigned int Patterncount = ARRAY_SIZE(BitPatterns);
7062 unsigned int i; 7062 unsigned int i;
7063 BOOLEAN rc = TRUE; 7063 BOOLEAN rc = TRUE;
7064 unsigned long flags; 7064 unsigned long flags;
@@ -7501,9 +7501,9 @@ static int mgsl_adapter_test( struct mgsl_struct *info )
7501 */ 7501 */
7502static BOOLEAN mgsl_memory_test( struct mgsl_struct *info ) 7502static BOOLEAN mgsl_memory_test( struct mgsl_struct *info )
7503{ 7503{
7504 static unsigned long BitPatterns[] = { 0x0, 0x55555555, 0xaaaaaaaa, 7504 static unsigned long BitPatterns[] =
7505 0x66666666, 0x99999999, 0xffffffff, 0x12345678 }; 7505 { 0x0, 0x55555555, 0xaaaaaaaa, 0x66666666, 0x99999999, 0xffffffff, 0x12345678 };
7506 unsigned long Patterncount = sizeof(BitPatterns)/sizeof(unsigned long); 7506 unsigned long Patterncount = ARRAY_SIZE(BitPatterns);
7507 unsigned long i; 7507 unsigned long i;
7508 unsigned long TestLimit = SHARED_MEM_ADDRESS_SIZE/sizeof(unsigned long); 7508 unsigned long TestLimit = SHARED_MEM_ADDRESS_SIZE/sizeof(unsigned long);
7509 unsigned long * TestAddr; 7509 unsigned long * TestAddr;