summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/bt8xx/bttv-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-03-29 08:42:30 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-03-29 08:42:30 -0300
commit396451756f52f81a20ee9099408b2b71192dae6f (patch)
treed45762b2148e1edb8e129d282bd35528107281d9 /linux/drivers/media/video/bt8xx/bttv-i2c.c
parent796a8651acd1759db5223b03bdbfe43f94d7c11e (diff)
downloadmediapointer-dvb-s2-396451756f52f81a20ee9099408b2b71192dae6f.tar.gz
mediapointer-dvb-s2-396451756f52f81a20ee9099408b2b71192dae6f.tar.bz2
Use ARRAY_SIZE instead of a magic number
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/bt8xx/bttv-i2c.c')
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c
index 68522754a..3f545c610 100644
--- a/linux/drivers/media/video/bt8xx/bttv-i2c.c
+++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c
@@ -426,7 +426,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c)
unsigned char buf;
int i,rc;
- for (i = 0; i < 128; i++) {
+ for (i = 0; i < ARRAY_SIZE(i2c_devs); i++) {
c->addr = i;
rc = i2c_master_recv(c,&buf,0);
if (rc < 0)