Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=667c7bc0aff18288186f1223784b57f77be7d81b
Commit:     667c7bc0aff18288186f1223784b57f77be7d81b
Parent:     af520a3478b59476ed61eddee73948807398e358
Author:     Andi Drebes <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 11:49:51 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 22:03:34 2007 -0300

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 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 69a46b3..5bbd2d5 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)
                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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to