Skip to content

Commit

Permalink
V4L/DVB (5942): Usb/vp7045.c: ARRAY_SIZE()
Browse files Browse the repository at this point in the history
This patch replaces an array size calculation done using sizeof
with an invocation of the ARRAY_SIZE macro.

Tested by compilation on an i386 box using "allyesconfig".
Diffed against Linus' git-tree.

Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Andi Drebes authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent af520a3 commit 667c7bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-usb/vp7045.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
return 0;
}

for (i = 0; i < sizeof(vp7045_rc_keys)/sizeof(struct dvb_usb_rc_key); i++)
for (i = 0; i < ARRAY_SIZE(vp7045_rc_keys); i++)
if (vp7045_rc_keys[i].data == key) {
*state = REMOTE_KEY_PRESSED;
*event = vp7045_rc_keys[i].event;
Expand Down

0 comments on commit 667c7bc

Please sign in to comment.