diff options
author | Andi Drebes <lists-receive@programmierforen.de> | 2007-07-30 10:49:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:03:34 -0400 |
commit | 667c7bc0aff18288186f1223784b57f77be7d81b (patch) | |
tree | 8e7ec1b1aff5c08fdb4942d9c607f080f6e22dc8 /drivers/media/dvb/dvb-usb | |
parent | af520a3478b59476ed61eddee73948807398e358 (diff) |
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: Andi Drebes <lists-receive@programmierforen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/vp7045.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c index 69a46b3607a2..5bbd2d5192f0 100644 --- a/drivers/media/dvb/dvb-usb/vp7045.c +++ b/drivers/media/dvb/dvb-usb/vp7045.c | |||
@@ -159,7 +159,7 @@ static int vp7045_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
159 | return 0; | 159 | return 0; |
160 | } | 160 | } |
161 | 161 | ||
162 | for (i = 0; i < sizeof(vp7045_rc_keys)/sizeof(struct dvb_usb_rc_key); i++) | 162 | for (i = 0; i < ARRAY_SIZE(vp7045_rc_keys); i++) |
163 | if (vp7045_rc_keys[i].data == key) { | 163 | if (vp7045_rc_keys[i].data == key) { |
164 | *state = REMOTE_KEY_PRESSED; | 164 | *state = REMOTE_KEY_PRESSED; |
165 | *event = vp7045_rc_keys[i].event; | 165 | *event = vp7045_rc_keys[i].event; |