diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-30 11:49:51 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-30 11:49:51 -0300 |
commit | e94249696bfda7993042980f7149c7de8fdbf344 (patch) | |
tree | 1551f1959ed697516265354686c44966d8be45c7 /linux/drivers/media | |
parent | 2c07c7014085afdacec6ddca46cea1329c66209e (diff) | |
download | mediapointer-dvb-s2-e94249696bfda7993042980f7149c7de8fdbf344.tar.gz mediapointer-dvb-s2-e94249696bfda7993042980f7149c7de8fdbf344.tar.bz2 |
Usb/vp7045.c: ARRAY_SIZE()
From: Andi Drebes <lists-receive@programmierforen.de>
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 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/vp7045.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/vp7045.c b/linux/drivers/media/dvb/dvb-usb/vp7045.c index 0ddeb3fce..e92f9aedf 100644 --- a/linux/drivers/media/dvb/dvb-usb/vp7045.c +++ b/linux/drivers/media/dvb/dvb-usb/vp7045.c @@ -167,7 +167,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; |