diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-06 22:59:18 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-06 22:59:18 -0200 |
commit | f904628e6435f1e218b065888a4f90d7709bee7b (patch) | |
tree | 9f2864fbfc7ae5eae9955a1c76055ead76a3dbdb /linux/drivers/media/dvb/bt8xx | |
parent | 1a5af409063c762b8d19699c214a1dce5b7a0360 (diff) | |
download | mediapointer-dvb-s2-f904628e6435f1e218b065888a4f90d7709bee7b.tar.gz mediapointer-dvb-s2-f904628e6435f1e218b065888a4f90d7709bee7b.tar.bz2 |
DVB: Use ARRAY_SIZE macro when appropriate
From: Ahmed S. Darwish <darwish.07@gmail.com>
Use ARRAY_SIZE macro already defined in kernel.h
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dst.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c index 9f72b7000..0393a3d19 100644 --- a/linux/drivers/media/dvb/bt8xx/dst.c +++ b/linux/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/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c index 254d9d1b5..43ba7cadb 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -23,6 +23,7 @@ #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h> +#include <linux/kernel.h> #include <linux/device.h> #include <linux/delay.h> #include <linux/slab.h> @@ -214,7 +215,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<sizeof(osci)/sizeof(osci[0]))&&(osci[i]<freq);i++); + for(i=1;(i<ARRAY_SIZE(osci))&&(osci[i]<freq);i++); printk("cx24108 debug: select vco #%d (f=%d)\n",i,freq); band=bandsel[i]; /* the gain values must be set by SetSymbolrate */ |