From 0496daa7d88d117fab4dd190c7f6e7c4a5aa15cd Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" Date: Wed, 14 Feb 2007 22:57:42 -0200 Subject: 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 Acked-by: Manu Abraham Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/bt8xx/dst.c | 2 +- drivers/media/dvb/bt8xx/dvb-bt8xx.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/media/dvb/bt8xx') diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 9f72b7000c0..0393a3d1992 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c @@ -1161,7 +1161,7 @@ static int dst_get_device_id(struct dst_state *state) } } - if (i >= sizeof (dst_tlist) / sizeof (dst_tlist [0])) { + if (i >= ARRAY_SIZE(dst_tlist)) { dprintk(verbose, DST_ERROR, 1, "Unable to recognize %s or %s", &state->rxbuffer[0], &state->rxbuffer[1]); dprintk(verbose, DST_ERROR, 1, "please email linux-dvb@linuxtv.org with this type in"); use_dst_type = DST_TYPE_IS_SAT; diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index 3e35931af35..58f69f6ae39 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -213,7 +214,7 @@ static int cx24108_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend freq = 2150000; /* satellite IF is 950..2150MHz */ /* decide which VCO to use for the input frequency */ - for(i=1;(i