diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-i2c.c | 3 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-i2c.c | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/video/bt8xx/bttv-i2c.c b/drivers/media/video/bt8xx/bttv-i2c.c index 62b873076e09..0dfa49b66418 100644 --- a/drivers/media/video/bt8xx/bttv-i2c.c +++ b/drivers/media/video/bt8xx/bttv-i2c.c | |||
@@ -412,7 +412,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) | |||
412 | unsigned char buf; | 412 | unsigned char buf; |
413 | int i,rc; | 413 | int i,rc; |
414 | 414 | ||
415 | for (i = 0; i < 128; i++) { | 415 | for (i = 0; i < ARRAY_SIZE(i2c_devs); i++) { |
416 | c->addr = i; | 416 | c->addr = i; |
417 | rc = i2c_master_recv(c,&buf,0); | 417 | rc = i2c_master_recv(c,&buf,0); |
418 | if (rc < 0) | 418 | if (rc < 0) |
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index 9830d5c43921..7919a1f9da06 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c | |||
@@ -1,3 +1,4 @@ | |||
1 | |||
1 | /* | 2 | /* |
2 | 3 | ||
3 | cx88-i2c.c -- all the i2c code is here | 4 | cx88-i2c.c -- all the i2c code is here |
@@ -195,7 +196,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) | |||
195 | unsigned char buf; | 196 | unsigned char buf; |
196 | int i,rc; | 197 | int i,rc; |
197 | 198 | ||
198 | for (i = 0; i < 128; i++) { | 199 | for (i = 0; i < ARRAY_SIZE(i2c_devs); i++) { |
199 | c->addr = i; | 200 | c->addr = i; |
200 | rc = i2c_master_recv(c,&buf,0); | 201 | rc = i2c_master_recv(c,&buf,0); |
201 | if (rc < 0) | 202 | if (rc < 0) |
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index d829d8f8c1f6..563a8319e608 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c | |||
@@ -523,7 +523,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) | |||
523 | unsigned char buf; | 523 | unsigned char buf; |
524 | int i, rc; | 524 | int i, rc; |
525 | 525 | ||
526 | for (i = 0; i < 128; i++) { | 526 | for (i = 0; i < ARRAY_SIZE(i2c_devs); i++) { |
527 | c->addr = i; | 527 | c->addr = i; |
528 | rc = i2c_master_recv(c, &buf, 0); | 528 | rc = i2c_master_recv(c, &buf, 0); |
529 | if (rc < 0) | 529 | if (rc < 0) |
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 210582d420f8..ed92b6f7187a 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -173,7 +173,7 @@ static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw, | |||
173 | return -EIO; | 173 | return -EIO; |
174 | } | 174 | } |
175 | 175 | ||
176 | for (start = 0; start<4; start++) { | 176 | for (start = 0; start < ARRAY_SIZE(b); start++) { |
177 | if (b[start] == marker) { | 177 | if (b[start] == marker) { |
178 | code=b[(start+parity_offset+1)%4]; | 178 | code=b[(start+parity_offset+1)%4]; |
179 | parity=b[(start+parity_offset)%4]; | 179 | parity=b[(start+parity_offset)%4]; |
diff --git a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c index 4e8d6c94ea60..1cb8c709ca90 100644 --- a/drivers/media/video/saa7134/saa7134-i2c.c +++ b/drivers/media/video/saa7134/saa7134-i2c.c | |||
@@ -447,7 +447,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) | |||
447 | unsigned char buf; | 447 | unsigned char buf; |
448 | int i,rc; | 448 | int i,rc; |
449 | 449 | ||
450 | for (i = 0; i < 128; i++) { | 450 | for (i = 0; i < ARRAY_SIZE(i2c_devs); i++) { |
451 | c->addr = i; | 451 | c->addr = i; |
452 | rc = i2c_master_recv(c,&buf,0); | 452 | rc = i2c_master_recv(c,&buf,0); |
453 | if (rc < 0) | 453 | if (rc < 0) |