diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-03-21 11:03:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:03:39 -0400 |
commit | a45c92756ed60bc89528701ac512e954acd23b9e (patch) | |
tree | 5be72157f668679109035c3d26b32cf14a15b7c5 /drivers/media/dvb | |
parent | 89885558ada9e076b48f4b6887e252e13e7eaf74 (diff) |
V4L/DVB (5949): s5h1409: use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | 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 4b77390f5d4b..25cf78142d94 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) | |||
476 | s5h1409_sleep(fe, 0); | 476 | s5h1409_sleep(fe, 0); |
477 | s5h1409_register_reset(fe); | 477 | s5h1409_register_reset(fe); |
478 | 478 | ||
479 | for (i=0; i<sizeof(init_tab) / sizeof (struct init_tab); i++) | 479 | for (i=0; i < ARRAY_SIZE(init_tab); i++) |
480 | s5h1409_writereg(state, init_tab[i].reg, init_tab[i].data); | 480 | s5h1409_writereg(state, init_tab[i].reg, init_tab[i].data); |
481 | 481 | ||
482 | /* The datasheet says that after initialisation, VSB is default */ | 482 | /* 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) | |||
542 | int i, ret = -EINVAL; | 542 | int i, ret = -EINVAL; |
543 | dprintk("%s()\n", __FUNCTION__); | 543 | dprintk("%s()\n", __FUNCTION__); |
544 | 544 | ||
545 | for (i=0; i<sizeof(qam256_snr_tab) / (sizeof(struct qam256_snr_tab)); i++) { | 545 | for (i=0; i < ARRAY_SIZE(qam256_snr_tab); i++) { |
546 | if (v < qam256_snr_tab[i].val) { | 546 | if (v < qam256_snr_tab[i].val) { |
547 | *snr = qam256_snr_tab[i].data; | 547 | *snr = qam256_snr_tab[i].data; |
548 | ret = 0; | 548 | ret = 0; |
@@ -557,7 +557,7 @@ static int s5h1409_qam64_lookup_snr(struct dvb_frontend* fe, u16* snr, u16 v) | |||
557 | int i, ret = -EINVAL; | 557 | int i, ret = -EINVAL; |
558 | dprintk("%s()\n", __FUNCTION__); | 558 | dprintk("%s()\n", __FUNCTION__); |
559 | 559 | ||
560 | for (i=0; i<sizeof(qam64_snr_tab) / (sizeof(struct qam64_snr_tab)); i++) { | 560 | for (i=0; i < ARRAY_SIZE(qam64_snr_tab); i++) { |
561 | if (v < qam64_snr_tab[i].val) { | 561 | if (v < qam64_snr_tab[i].val) { |
562 | *snr = qam64_snr_tab[i].data; | 562 | *snr = qam64_snr_tab[i].data; |
563 | ret = 0; | 563 | ret = 0; |
@@ -572,7 +572,7 @@ static int s5h1409_vsb_lookup_snr(struct dvb_frontend* fe, u16* snr, u16 v) | |||
572 | int i, ret = -EINVAL; | 572 | int i, ret = -EINVAL; |
573 | dprintk("%s()\n", __FUNCTION__); | 573 | dprintk("%s()\n", __FUNCTION__); |
574 | 574 | ||
575 | for (i=0; i<sizeof(vsb_snr_tab) / (sizeof(struct vsb_snr_tab)); i++) { | 575 | for (i=0; i < ARRAY_SIZE(vsb_snr_tab); i++) { |
576 | if (v > vsb_snr_tab[i].val) { | 576 | if (v > vsb_snr_tab[i].val) { |
577 | *snr = vsb_snr_tab[i].data; | 577 | *snr = vsb_snr_tab[i].data; |
578 | ret = 0; | 578 | ret = 0; |