aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/cx24123.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-02-14 19:57:42 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:35:18 -0500
commit0496daa7d88d117fab4dd190c7f6e7c4a5aa15cd (patch)
tree184317008142232cc6b90964394e35438582ad59 /drivers/media/dvb/frontends/cx24123.c
parentfd4bc4455360ff0b6ff50ec8fa5673b4da18cbb6 (diff)
V4L/DVB (5202): DVB: Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/cx24123.c')
-rw-r--r--drivers/media/dvb/frontends/cx24123.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c
index a356d28fc3bb..732e94aaa364 100644
--- a/drivers/media/dvb/frontends/cx24123.c
+++ b/drivers/media/dvb/frontends/cx24123.c
@@ -507,7 +507,7 @@ static int cx24123_pll_calculate(struct dvb_frontend* fe, struct dvb_frontend_pa
507 int i = 0; 507 int i = 0;
508 int pump = 2; 508 int pump = 2;
509 int band = 0; 509 int band = 0;
510 int num_bands = sizeof(cx24123_bandselect_vals) / sizeof(cx24123_bandselect_vals[0]); 510 int num_bands = ARRAY_SIZE(cx24123_bandselect_vals);
511 511
512 /* Defaults for low freq, low rate */ 512 /* Defaults for low freq, low rate */
513 state->VCAarg = cx24123_AGC_vals[0].VCAprogdata; 513 state->VCAarg = cx24123_AGC_vals[0].VCAprogdata;
@@ -516,7 +516,7 @@ static int cx24123_pll_calculate(struct dvb_frontend* fe, struct dvb_frontend_pa
516 vco_div = cx24123_bandselect_vals[0].VCOdivider; 516 vco_div = cx24123_bandselect_vals[0].VCOdivider;
517 517
518 /* For the given symbol rate, determine the VCA, VGA and FILTUNE programming bits */ 518 /* For the given symbol rate, determine the VCA, VGA and FILTUNE programming bits */
519 for (i = 0; i < sizeof(cx24123_AGC_vals) / sizeof(cx24123_AGC_vals[0]); i++) 519 for (i = 0; i < ARRAY_SIZE(cx24123_AGC_vals); i++)
520 { 520 {
521 if ((cx24123_AGC_vals[i].symbolrate_low <= p->u.qpsk.symbol_rate) && 521 if ((cx24123_AGC_vals[i].symbolrate_low <= p->u.qpsk.symbol_rate) &&
522 (cx24123_AGC_vals[i].symbolrate_high >= p->u.qpsk.symbol_rate) ) { 522 (cx24123_AGC_vals[i].symbolrate_high >= p->u.qpsk.symbol_rate) ) {
@@ -658,7 +658,7 @@ static int cx24123_initfe(struct dvb_frontend* fe)
658 dprintk("%s: init frontend\n",__FUNCTION__); 658 dprintk("%s: init frontend\n",__FUNCTION__);
659 659
660 /* Configure the demod to a good set of defaults */ 660 /* Configure the demod to a good set of defaults */
661 for (i = 0; i < sizeof(cx24123_regdata) / sizeof(cx24123_regdata[0]); i++) 661 for (i = 0; i < ARRAY_SIZE(cx24123_regdata); i++)
662 cx24123_writereg(state, cx24123_regdata[i].reg, cx24123_regdata[i].data); 662 cx24123_writereg(state, cx24123_regdata[i].reg, cx24123_regdata[i].data);
663 663
664 /* Set the LNB polarity */ 664 /* Set the LNB polarity */