aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia
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/pcmcia
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/pcmcia')
-rw-r--r--drivers/char/pcmcia/synclink_cs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index cf45b100eff1..9fb10c9fec88 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -4005,7 +4005,7 @@ BOOLEAN register_test(MGSLPC_INFO *info)
4005{ 4005{
4006 static unsigned char patterns[] = 4006 static unsigned char patterns[] =
4007 { 0x00, 0xff, 0xaa, 0x55, 0x69, 0x96, 0x0f }; 4007 { 0x00, 0xff, 0xaa, 0x55, 0x69, 0x96, 0x0f };
4008 static unsigned int count = sizeof(patterns) / sizeof(patterns[0]); 4008 static unsigned int count = ARRAY_SIZE(patterns);
4009 unsigned int i; 4009 unsigned int i;
4010 BOOLEAN rc = TRUE; 4010 BOOLEAN rc = TRUE;
4011 unsigned long flags; 4011 unsigned long flags;
@@ -4016,7 +4016,7 @@ BOOLEAN register_test(MGSLPC_INFO *info)
4016 for (i = 0; i < count; i++) { 4016 for (i = 0; i < count; i++) {
4017 write_reg(info, XAD1, patterns[i]); 4017 write_reg(info, XAD1, patterns[i]);
4018 write_reg(info, XAD2, patterns[(i + 1) % count]); 4018 write_reg(info, XAD2, patterns[(i + 1) % count]);
4019 if ((read_reg(info, XAD1) != patterns[i]) || 4019 if ((read_reg(info, XAD1) != patterns[i]) ||
4020 (read_reg(info, XAD2) != patterns[(i + 1) % count])) { 4020 (read_reg(info, XAD2) != patterns[(i + 1) % count])) {
4021 rc = FALSE; 4021 rc = FALSE;
4022 break; 4022 break;