Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a45c92756ed60bc89528701ac512e954acd23b9e
Commit:     a45c92756ed60bc89528701ac512e954acd23b9e
Parent:     89885558ada9e076b48f4b6887e252e13e7eaf74
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 21 12:03:23 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 22:03:39 2007 -0300

    V4L/DVB (5949): s5h1409: use ARRAY_SIZE macro when appropriate
    
    Use ARRAY_SIZE macro already defined in kernel.h
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/frontends/s5h1409.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb/frontends/s5h1409.c 
b/drivers/media/dvb/frontends/s5h1409.c
index 4b77390..25cf781 100644
--- a/drivers/media/dvb/frontends/s5h1409.c
+++ b/drivers/media/dvb/frontends/s5h1409.c
@@ -476,7 +476,7 @@ static int s5h1409_init (struct dvb_frontend* fe)
        s5h1409_sleep(fe, 0);
        s5h1409_register_reset(fe);
 
-       for (i=0; i<sizeof(init_tab) / sizeof (struct init_tab); i++)
+       for (i=0; i < ARRAY_SIZE(init_tab); i++)
                s5h1409_writereg(state, init_tab[i].reg, init_tab[i].data);
 
        /* The datasheet says that after initialisation, VSB is default */
@@ -542,7 +542,7 @@ static int s5h1409_qam256_lookup_snr(struct dvb_frontend* 
fe, u16* snr, u16 v)
        int i, ret = -EINVAL;
        dprintk("%s()\n", __FUNCTION__);
 
-       for (i=0; i<sizeof(qam256_snr_tab) / (sizeof(struct qam256_snr_tab)); 
i++) {
+       for (i=0; i < ARRAY_SIZE(qam256_snr_tab); i++) {
                if (v < qam256_snr_tab[i].val) {
                        *snr = qam256_snr_tab[i].data;
                        ret = 0;
@@ -557,7 +557,7 @@ static int s5h1409_qam64_lookup_snr(struct dvb_frontend* 
fe, u16* snr, u16 v)
        int i, ret = -EINVAL;
        dprintk("%s()\n", __FUNCTION__);
 
-       for (i=0; i<sizeof(qam64_snr_tab) / (sizeof(struct qam64_snr_tab)); 
i++) {
+       for (i=0; i < ARRAY_SIZE(qam64_snr_tab); i++) {
                if (v < qam64_snr_tab[i].val) {
                        *snr = qam64_snr_tab[i].data;
                        ret = 0;
@@ -572,7 +572,7 @@ static int s5h1409_vsb_lookup_snr(struct dvb_frontend* fe, 
u16* snr, u16 v)
        int i, ret = -EINVAL;
        dprintk("%s()\n", __FUNCTION__);
 
-       for (i=0; i<sizeof(vsb_snr_tab) / (sizeof(struct vsb_snr_tab)); i++) {
+       for (i=0; i < ARRAY_SIZE(vsb_snr_tab); i++) {
                if (v > vsb_snr_tab[i].val) {
                        *snr = vsb_snr_tab[i].data;
                        ret = 0;
-
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