aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/bt8xx
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/bt8xx
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/bt8xx')
-rw-r--r--drivers/media/dvb/bt8xx/dst.c2
-rw-r--r--drivers/media/dvb/bt8xx/dvb-bt8xx.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index 9f72b7000c08..0393a3d19920 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)
1161 } 1161 }
1162 } 1162 }
1163 1163
1164 if (i >= sizeof (dst_tlist) / sizeof (dst_tlist [0])) { 1164 if (i >= ARRAY_SIZE(dst_tlist)) {
1165 dprintk(verbose, DST_ERROR, 1, "Unable to recognize %s or %s", &state->rxbuffer[0], &state->rxbuffer[1]); 1165 dprintk(verbose, DST_ERROR, 1, "Unable to recognize %s or %s", &state->rxbuffer[0], &state->rxbuffer[1]);
1166 dprintk(verbose, DST_ERROR, 1, "please email linux-dvb@linuxtv.org with this type in"); 1166 dprintk(verbose, DST_ERROR, 1, "please email linux-dvb@linuxtv.org with this type in");
1167 use_dst_type = DST_TYPE_IS_SAT; 1167 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 3e35931af35d..58f69f6ae391 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -23,6 +23,7 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/moduleparam.h> 24#include <linux/moduleparam.h>
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/kernel.h>
26#include <linux/device.h> 27#include <linux/device.h>
27#include <linux/delay.h> 28#include <linux/delay.h>
28#include <linux/slab.h> 29#include <linux/slab.h>
@@ -213,7 +214,7 @@ static int cx24108_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend
213 freq = 2150000; /* satellite IF is 950..2150MHz */ 214 freq = 2150000; /* satellite IF is 950..2150MHz */
214 215
215 /* decide which VCO to use for the input frequency */ 216 /* decide which VCO to use for the input frequency */
216 for(i=1;(i<sizeof(osci)/sizeof(osci[0]))&&(osci[i]<freq);i++); 217 for(i = 1; (i < ARRAY_SIZE(osci)) && (osci[i] < freq); i++);
217 printk("cx24108 debug: select vco #%d (f=%d)\n",i,freq); 218 printk("cx24108 debug: select vco #%d (f=%d)\n",i,freq);
218 band=bandsel[i]; 219 band=bandsel[i];
219 /* the gain values must be set by SetSymbolrate */ 220 /* the gain values must be set by SetSymbolrate */