[PATCH] drivers/char: Use ARRAY_SIZE macro
[deliverable/linux.git] / drivers / char / pcmcia / synclink_cs.c
index cf45b100eff1e269f826ae6dbf5a825a3e58677a..9fb10c9fec88ca60229148d11993afc291341519 100644 (file)
@@ -4005,7 +4005,7 @@ BOOLEAN register_test(MGSLPC_INFO *info)
 {
        static unsigned char patterns[] = 
            { 0x00, 0xff, 0xaa, 0x55, 0x69, 0x96, 0x0f };
-       static unsigned int count = sizeof(patterns) / sizeof(patterns[0]);
+       static unsigned int count = ARRAY_SIZE(patterns);
        unsigned int i;
        BOOLEAN rc = TRUE;
        unsigned long flags;
@@ -4016,7 +4016,7 @@ BOOLEAN register_test(MGSLPC_INFO *info)
        for (i = 0; i < count; i++) {
                write_reg(info, XAD1, patterns[i]);
                write_reg(info, XAD2, patterns[(i + 1) % count]);
-               if ((read_reg(info, XAD1) != patterns[i]) || 
+               if ((read_reg(info, XAD1) != patterns[i]) ||
                    (read_reg(info, XAD2) != patterns[(i + 1) % count])) {
                        rc = FALSE;
                        break;
This page took 0.024027 seconds and 5 git commands to generate.