From: Andi Drebes Date: Fri, 15 Jun 2007 03:33:01 +0000 (-0400) Subject: Input: grip-mp - use ARRAY_SIZE X-Git-Tag: v2.6.23-rc1~1169 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ec1f7f3e4a4896062dc6a64d38036588733bc23;p=linux-2.6 Input: grip-mp - use ARRAY_SIZE Signed-off-by: Andi Drebes Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c index 555319e637..4ed3a3eadf 100644 --- a/drivers/input/joystick/grip_mp.c +++ b/drivers/input/joystick/grip_mp.c @@ -320,10 +320,10 @@ static int multiport_io(struct gameport* gameport, int sendflags, int sendcode, static int dig_mode_start(struct gameport *gameport, u32 *packet) { - int i, seq_len = sizeof(init_seq)/sizeof(int); + int i; int flags, tries = 0, bads = 0; - for (i = 0; i < seq_len; i++) { /* Send magic sequence */ + for (i = 0; i < ARRAY_SIZE(init_seq); i++) { /* Send magic sequence */ if (init_seq[i]) gameport_trigger(gameport); udelay(GRIP_INIT_DELAY);