diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-01 08:37:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 11:30:34 -0400 |
commit | d87edf264a1f7d7678015e5a6752cde877434d4b (patch) | |
tree | a846f3e2003a92e31c90c760bf91c65ef72ce8a3 | |
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>
-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) | |||
98 | if (reg>0x1f || reg==1 || reg==0x0f || reg==0x14 || reg==0x18 | 98 | if (reg>0x1f || reg==1 || reg==0x0f || reg==0x14 || reg==0x18 |
99 | || reg==0x19 || reg==0x1d || reg==0x1e) | 99 | || reg==0x19 || reg==0x1d || reg==0x1e) |
100 | return 0; | 100 | return 0; |
101 | break; | ||
101 | case V4L2_IDENT_SAA7113: | 102 | case V4L2_IDENT_SAA7113: |
102 | if (reg>0x62 || reg==0x14 || (reg>=0x18 && reg<=0x1e) || | 103 | if (reg>0x62 || reg==0x14 || (reg>=0x18 && reg<=0x1e) || |
103 | (reg>=0x20 && reg<=0x3f) ||reg==0x5f ) | 104 | (reg>=0x20 && reg<=0x3f) ||reg==0x5f ) |
104 | return 0; | 105 | return 0; |
106 | break; | ||
105 | case V4L2_IDENT_SAA7114: | 107 | case V4L2_IDENT_SAA7114: |
106 | if (reg>=0xf0 || (reg>=0x1a && reg<=0x1e) || | 108 | if (reg>=0xf0 || (reg>=0x1a && reg<=0x1e) || |
107 | (reg>=0x20 && reg<=0x2f) || | 109 | (reg>=0x20 && reg<=0x2f) || |
108 | (reg>=0x63 && reg<=0x7f) ) | 110 | (reg>=0x63 && reg<=0x7f) ) |
109 | return 0; | 111 | return 0; |
112 | break; | ||
110 | case V4L2_IDENT_SAA7115: | 113 | case V4L2_IDENT_SAA7115: |
111 | if ((reg>=0x20 && reg<=0x2f) || (reg==0x5c) || | 114 | if ((reg>=0x20 && reg<=0x2f) || (reg==0x5c) || |
112 | (reg>=0xfc && reg<=0xfe) ) | 115 | (reg>=0xfc && reg<=0xfe) ) |
113 | return 0; | 116 | return 0; |
117 | break; | ||
114 | case V4L2_IDENT_SAA7118: | 118 | case V4L2_IDENT_SAA7118: |
115 | if (reg>=0xf0 || (reg>=0x1a && reg<=0x1d) || | 119 | if (reg>=0xf0 || (reg>=0x1a && reg<=0x1d) || |
116 | (reg>=0x63 && reg<=0x6f) ) | 120 | (reg>=0x63 && reg<=0x6f) ) |
@@ -123,7 +127,6 @@ static int saa711x_has_reg(const int id, const u8 reg) | |||
123 | (reg>=0x3b && reg<=0x3f) || (reg==0x5f) || | 127 | (reg>=0x3b && reg<=0x3f) || (reg==0x5f) || |
124 | (reg>=0x63 && reg<=0x6f) ) ) | 128 | (reg>=0x63 && reg<=0x6f) ) ) |
125 | return 0; | 129 | return 0; |
126 | |||
127 | return 1; | 130 | return 1; |
128 | } | 131 | } |
129 | 132 | ||
@@ -141,6 +144,8 @@ static int saa711x_writeregs(struct i2c_client *client, const unsigned char *reg | |||
141 | if (saa711x_has_reg(state->ident,reg)) { | 144 | if (saa711x_has_reg(state->ident,reg)) { |
142 | if (saa711x_write(client, reg, data) < 0) | 145 | if (saa711x_write(client, reg, data) < 0) |
143 | return -1; | 146 | return -1; |
147 | } else { | ||
148 | v4l_dbg(1, debug, client, "tried to access reserved reg 0x%02x\n", reg); | ||
144 | } | 149 | } |
145 | } | 150 | } |
146 | return 0; | 151 | return 0; |