Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 667c7bc0 authored by Andi Drebes's avatar Andi Drebes Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (5942): Usb/vp7045.c: ARRAY_SIZE()



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: default avatarAndi Drebes <lists-receive@programmierforen.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent af520a34
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;