diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-01 09:37:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 12:30:34 -0300 |
commit | d87edf264a1f7d7678015e5a6752cde877434d4b (patch) | |
tree | a846f3e2003a92e31c90c760bf91c65ef72ce8a3 /drivers/media/video | |
parent | 66440ccbf2f4077ce59c9692a2c7288201ea0171 (diff) |
V4L/DVB (4573): Fix: There were some missing breaks at register check routine
Without the breaks, saa7115 were not initializing PLL2.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/saa7115.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 987f540bc161..2257e4e835a1 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c @@ -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) ) @@ -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; } @@ -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; |