diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-03-21 11:03:23 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-03-21 11:03:23 -0400 |
commit | 6ca5465adfdb0a5232dd643cfcfcab959a33aa94 (patch) | |
tree | ce1b8085ec859792ebeba1611c030dcaf2b9d7ec /linux/drivers/media/dvb | |
parent | 492bd4ec51b98c486f341f633a8ed793c3f40e07 (diff) | |
download | mediapointer-dvb-s2-6ca5465adfdb0a5232dd643cfcfcab959a33aa94.tar.gz mediapointer-dvb-s2-6ca5465adfdb0a5232dd643cfcfcab959a33aa94.tar.bz2 |
s5h1409: use ARRAY_SIZE macro when appropriate
From: Michael Krufky <mkrufky@linuxtv.org>
Use ARRAY_SIZE macro already defined in kernel.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/frontends/s5h1409.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/frontends/s5h1409.c b/linux/drivers/media/dvb/frontends/s5h1409.c index d46425b30..035a94bff 100644 --- a/linux/drivers/media/dvb/frontends/s5h1409.c +++ b/linux/drivers/media/dvb/frontends/s5h1409.c @@ -483,7 +483,7 @@ static int s5h1409_init (struct dvb_frontend* fe) s5h1409_sleep(fe, 0); s5h1409_register_reset(fe); - for (i=0; i<sizeof(init_tab) / sizeof (struct init_tab); i++) + for (i=0; i < ARRAY_SIZE(init_tab); i++) s5h1409_writereg(state, init_tab[i].reg, init_tab[i].data); /* The datasheet says that after initialisation, VSB is default */ @@ -549,7 +549,7 @@ static int s5h1409_qam256_lookup_snr(struct dvb_frontend* fe, u16* snr, u16 v) int i, ret = -EINVAL; dprintk("%s()\n", __FUNCTION__); - for (i=0; i<sizeof(qam256_snr_tab) / (sizeof(struct qam256_snr_tab)); i++) { + for (i=0; i < ARRAY_SIZE(qam256_snr_tab); i++) { if (v < qam256_snr_tab[i].val) { *snr = qam256_snr_tab[i].data; ret = 0; @@ -564,7 +564,7 @@ static int s5h1409_qam64_lookup_snr(struct dvb_frontend* fe, u16* snr, u16 v) int i, ret = -EINVAL; dprintk("%s()\n", __FUNCTION__); - for (i=0; i<sizeof(qam64_snr_tab) / (sizeof(struct qam64_snr_tab)); i++) { + for (i=0; i < ARRAY_SIZE(qam64_snr_tab); i++) { if (v < qam64_snr_tab[i].val) { *snr = qam64_snr_tab[i].data; ret = 0; @@ -579,7 +579,7 @@ static int s5h1409_vsb_lookup_snr(struct dvb_frontend* fe, u16* snr, u16 v) int i, ret = -EINVAL; dprintk("%s()\n", __FUNCTION__); - for (i=0; i<sizeof(vsb_snr_tab) / (sizeof(struct vsb_snr_tab)); i++) { + for (i=0; i < ARRAY_SIZE(vsb_snr_tab); i++) { if (v > vsb_snr_tab[i].val) { *snr = vsb_snr_tab[i].data; ret = 0; |