Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37446
b: refs/heads/master
c: d87edf2
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Sep 26, 2006
1 parent 8ecbcf9 commit a6cac4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66440ccbf2f4077ce59c9692a2c7288201ea0171
refs/heads/master: d87edf264a1f7d7678015e5a6752cde877434d4b
7 changes: 6 additions & 1 deletion trunk/drivers/media/video/saa7115.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,23 @@ static int saa711x_has_reg(const int id, const u8 reg)
if (reg>0x1f || reg==1 || reg==0x0f || reg==0x14 || reg==0x18
|| reg==0x19 || reg==0x1d || reg==0x1e)
return 0;
break;
case V4L2_IDENT_SAA7113:
if (reg>0x62 || reg==0x14 || (reg>=0x18 && reg<=0x1e) ||
(reg>=0x20 && reg<=0x3f) ||reg==0x5f )
return 0;
break;
case V4L2_IDENT_SAA7114:
if (reg>=0xf0 || (reg>=0x1a && reg<=0x1e) ||
(reg>=0x20 && reg<=0x2f) ||
(reg>=0x63 && reg<=0x7f) )
return 0;
break;
case V4L2_IDENT_SAA7115:
if ((reg>=0x20 && reg<=0x2f) || (reg==0x5c) ||
(reg>=0xfc && reg<=0xfe) )
return 0;
break;
case V4L2_IDENT_SAA7118:
if (reg>=0xf0 || (reg>=0x1a && reg<=0x1d) ||
(reg>=0x63 && reg<=0x6f) )
Expand All @@ -123,7 +127,6 @@ static int saa711x_has_reg(const int id, const u8 reg)
(reg>=0x3b && reg<=0x3f) || (reg==0x5f) ||
(reg>=0x63 && reg<=0x6f) ) )
return 0;

return 1;
}

Expand All @@ -141,6 +144,8 @@ static int saa711x_writeregs(struct i2c_client *client, const unsigned char *reg
if (saa711x_has_reg(state->ident,reg)) {
if (saa711x_write(client, reg, data) < 0)
return -1;
} else {
v4l_dbg(1, debug, client, "tried to access reserved reg 0x%02x\n", reg);
}
}
return 0;
Expand Down

0 comments on commit a6cac4d

Please sign in to comment.