diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-12-12 04:50:20 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:04:04 -0500 |
commit | f19a73d620c5412e2413b778f4dad21febdd6115 (patch) | |
tree | 66b518a49a6e643b22f80aa851d6017e66c44a19 | |
parent | 5412c8204f8c4f733acef511979fe1a738b74767 (diff) |
V4L/DVB (6860): tveeprom: CodingStyle cleanup
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/tveeprom.c | 471 |
1 files changed, 237 insertions, 234 deletions
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index 4d294e2becb9..11c15787e25f 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -46,11 +46,12 @@ MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver"); | |||
46 | MODULE_AUTHOR("John Klar"); | 46 | MODULE_AUTHOR("John Klar"); |
47 | MODULE_LICENSE("GPL"); | 47 | MODULE_LICENSE("GPL"); |
48 | 48 | ||
49 | static int debug = 0; | 49 | static int debug; |
50 | module_param(debug, int, 0644); | 50 | module_param(debug, int, 0644); |
51 | MODULE_PARM_DESC(debug, "Debug level (0-1)"); | 51 | MODULE_PARM_DESC(debug, "Debug level (0-1)"); |
52 | 52 | ||
53 | #define STRM(array,i) (i < sizeof(array)/sizeof(char*) ? array[i] : "unknown") | 53 | #define STRM(array, i) \ |
54 | (i < sizeof(array) / sizeof(char *) ? array[i] : "unknown") | ||
54 | 55 | ||
55 | #define tveeprom_info(fmt, arg...) \ | 56 | #define tveeprom_info(fmt, arg...) \ |
56 | v4l_printk(KERN_INFO, "tveeprom", c->adapter, c->addr, fmt , ## arg) | 57 | v4l_printk(KERN_INFO, "tveeprom", c->adapter, c->addr, fmt , ## arg) |
@@ -58,7 +59,8 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); | |||
58 | v4l_printk(KERN_WARNING, "tveeprom", c->adapter, c->addr, fmt , ## arg) | 59 | v4l_printk(KERN_WARNING, "tveeprom", c->adapter, c->addr, fmt , ## arg) |
59 | #define tveeprom_dbg(fmt, arg...) do { \ | 60 | #define tveeprom_dbg(fmt, arg...) do { \ |
60 | if (debug) \ | 61 | if (debug) \ |
61 | v4l_printk(KERN_DEBUG, "tveeprom", c->adapter, c->addr, fmt , ## arg); \ | 62 | v4l_printk(KERN_DEBUG, "tveeprom", \ |
63 | c->adapter, c->addr, fmt , ## arg); \ | ||
62 | } while (0) | 64 | } while (0) |
63 | 65 | ||
64 | /* | 66 | /* |
@@ -94,170 +96,170 @@ static struct HAUPPAUGE_TUNER | |||
94 | hauppauge_tuner[] = | 96 | hauppauge_tuner[] = |
95 | { | 97 | { |
96 | /* 0-9 */ | 98 | /* 0-9 */ |
97 | { TUNER_ABSENT, "None" }, | 99 | { TUNER_ABSENT, "None" }, |
98 | { TUNER_ABSENT, "External" }, | 100 | { TUNER_ABSENT, "External" }, |
99 | { TUNER_ABSENT, "Unspecified" }, | 101 | { TUNER_ABSENT, "Unspecified" }, |
100 | { TUNER_PHILIPS_PAL, "Philips FI1216" }, | 102 | { TUNER_PHILIPS_PAL, "Philips FI1216" }, |
101 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF" }, | 103 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF" }, |
102 | { TUNER_PHILIPS_NTSC, "Philips FI1236" }, | 104 | { TUNER_PHILIPS_NTSC, "Philips FI1236" }, |
103 | { TUNER_PHILIPS_PAL_I, "Philips FI1246" }, | 105 | { TUNER_PHILIPS_PAL_I, "Philips FI1246" }, |
104 | { TUNER_PHILIPS_PAL_DK,"Philips FI1256" }, | 106 | { TUNER_PHILIPS_PAL_DK, "Philips FI1256" }, |
105 | { TUNER_PHILIPS_PAL, "Philips FI1216 MK2" }, | 107 | { TUNER_PHILIPS_PAL, "Philips FI1216 MK2" }, |
106 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF MK2" }, | 108 | { TUNER_PHILIPS_SECAM, "Philips FI1216MF MK2" }, |
107 | /* 10-19 */ | 109 | /* 10-19 */ |
108 | { TUNER_PHILIPS_NTSC, "Philips FI1236 MK2" }, | 110 | { TUNER_PHILIPS_NTSC, "Philips FI1236 MK2" }, |
109 | { TUNER_PHILIPS_PAL_I, "Philips FI1246 MK2" }, | 111 | { TUNER_PHILIPS_PAL_I, "Philips FI1246 MK2" }, |
110 | { TUNER_PHILIPS_PAL_DK,"Philips FI1256 MK2" }, | 112 | { TUNER_PHILIPS_PAL_DK, "Philips FI1256 MK2" }, |
111 | { TUNER_TEMIC_NTSC, "Temic 4032FY5" }, | 113 | { TUNER_TEMIC_NTSC, "Temic 4032FY5" }, |
112 | { TUNER_TEMIC_PAL, "Temic 4002FH5" }, | 114 | { TUNER_TEMIC_PAL, "Temic 4002FH5" }, |
113 | { TUNER_TEMIC_PAL_I, "Temic 4062FY5" }, | 115 | { TUNER_TEMIC_PAL_I, "Temic 4062FY5" }, |
114 | { TUNER_PHILIPS_PAL, "Philips FR1216 MK2" }, | 116 | { TUNER_PHILIPS_PAL, "Philips FR1216 MK2" }, |
115 | { TUNER_PHILIPS_SECAM, "Philips FR1216MF MK2" }, | 117 | { TUNER_PHILIPS_SECAM, "Philips FR1216MF MK2" }, |
116 | { TUNER_PHILIPS_NTSC, "Philips FR1236 MK2" }, | 118 | { TUNER_PHILIPS_NTSC, "Philips FR1236 MK2" }, |
117 | { TUNER_PHILIPS_PAL_I, "Philips FR1246 MK2" }, | 119 | { TUNER_PHILIPS_PAL_I, "Philips FR1246 MK2" }, |
118 | /* 20-29 */ | 120 | /* 20-29 */ |
119 | { TUNER_PHILIPS_PAL_DK,"Philips FR1256 MK2" }, | 121 | { TUNER_PHILIPS_PAL_DK, "Philips FR1256 MK2" }, |
120 | { TUNER_PHILIPS_PAL, "Philips FM1216" }, | 122 | { TUNER_PHILIPS_PAL, "Philips FM1216" }, |
121 | { TUNER_PHILIPS_SECAM, "Philips FM1216MF" }, | 123 | { TUNER_PHILIPS_SECAM, "Philips FM1216MF" }, |
122 | { TUNER_PHILIPS_NTSC, "Philips FM1236" }, | 124 | { TUNER_PHILIPS_NTSC, "Philips FM1236" }, |
123 | { TUNER_PHILIPS_PAL_I, "Philips FM1246" }, | 125 | { TUNER_PHILIPS_PAL_I, "Philips FM1246" }, |
124 | { TUNER_PHILIPS_PAL_DK,"Philips FM1256" }, | 126 | { TUNER_PHILIPS_PAL_DK, "Philips FM1256" }, |
125 | { TUNER_TEMIC_4036FY5_NTSC, "Temic 4036FY5" }, | 127 | { TUNER_TEMIC_4036FY5_NTSC, "Temic 4036FY5" }, |
126 | { TUNER_ABSENT, "Samsung TCPN9082D" }, | 128 | { TUNER_ABSENT, "Samsung TCPN9082D" }, |
127 | { TUNER_ABSENT, "Samsung TCPM9092P" }, | 129 | { TUNER_ABSENT, "Samsung TCPM9092P" }, |
128 | { TUNER_TEMIC_4006FH5_PAL, "Temic 4006FH5" }, | 130 | { TUNER_TEMIC_4006FH5_PAL, "Temic 4006FH5" }, |
129 | /* 30-39 */ | 131 | /* 30-39 */ |
130 | { TUNER_ABSENT, "Samsung TCPN9085D" }, | 132 | { TUNER_ABSENT, "Samsung TCPN9085D" }, |
131 | { TUNER_ABSENT, "Samsung TCPB9085P" }, | 133 | { TUNER_ABSENT, "Samsung TCPB9085P" }, |
132 | { TUNER_ABSENT, "Samsung TCPL9091P" }, | 134 | { TUNER_ABSENT, "Samsung TCPL9091P" }, |
133 | { TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" }, | 135 | { TUNER_TEMIC_4039FR5_NTSC, "Temic 4039FR5" }, |
134 | { TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" }, | 136 | { TUNER_PHILIPS_FQ1216ME, "Philips FQ1216 ME" }, |
135 | { TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" }, | 137 | { TUNER_TEMIC_4066FY5_PAL_I, "Temic 4066FY5" }, |
136 | { TUNER_PHILIPS_NTSC, "Philips TD1536" }, | 138 | { TUNER_PHILIPS_NTSC, "Philips TD1536" }, |
137 | { TUNER_PHILIPS_NTSC, "Philips TD1536D" }, | 139 | { TUNER_PHILIPS_NTSC, "Philips TD1536D" }, |
138 | { TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */ | 140 | { TUNER_PHILIPS_NTSC, "Philips FMR1236" }, /* mono radio */ |
139 | { TUNER_ABSENT, "Philips FI1256MP" }, | 141 | { TUNER_ABSENT, "Philips FI1256MP" }, |
140 | /* 40-49 */ | 142 | /* 40-49 */ |
141 | { TUNER_ABSENT, "Samsung TCPQ9091P" }, | 143 | { TUNER_ABSENT, "Samsung TCPQ9091P" }, |
142 | { TUNER_TEMIC_4006FN5_MULTI_PAL, "Temic 4006FN5" }, | 144 | { TUNER_TEMIC_4006FN5_MULTI_PAL, "Temic 4006FN5" }, |
143 | { TUNER_TEMIC_4009FR5_PAL, "Temic 4009FR5" }, | 145 | { TUNER_TEMIC_4009FR5_PAL, "Temic 4009FR5" }, |
144 | { TUNER_TEMIC_4046FM5, "Temic 4046FM5" }, | 146 | { TUNER_TEMIC_4046FM5, "Temic 4046FM5" }, |
145 | { TUNER_TEMIC_4009FN5_MULTI_PAL_FM, "Temic 4009FN5" }, | 147 | { TUNER_TEMIC_4009FN5_MULTI_PAL_FM, "Temic 4009FN5" }, |
146 | { TUNER_ABSENT, "Philips TD1536D FH 44"}, | 148 | { TUNER_ABSENT, "Philips TD1536D FH 44"}, |
147 | { TUNER_LG_NTSC_FM, "LG TP18NSR01F"}, | 149 | { TUNER_LG_NTSC_FM, "LG TP18NSR01F"}, |
148 | { TUNER_LG_PAL_FM, "LG TP18PSB01D"}, | 150 | { TUNER_LG_PAL_FM, "LG TP18PSB01D"}, |
149 | { TUNER_LG_PAL, "LG TP18PSB11D"}, | 151 | { TUNER_LG_PAL, "LG TP18PSB11D"}, |
150 | { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"}, | 152 | { TUNER_LG_PAL_I_FM, "LG TAPC-I001D"}, |
151 | /* 50-59 */ | 153 | /* 50-59 */ |
152 | { TUNER_LG_PAL_I, "LG TAPC-I701D"}, | 154 | { TUNER_LG_PAL_I, "LG TAPC-I701D"}, |
153 | { TUNER_ABSENT, "Temic 4042FI5"}, | 155 | { TUNER_ABSENT, "Temic 4042FI5"}, |
154 | { TUNER_MICROTUNE_4049FM5, "Microtune 4049 FM5"}, | 156 | { TUNER_MICROTUNE_4049FM5, "Microtune 4049 FM5"}, |
155 | { TUNER_ABSENT, "LG TPI8NSR11F"}, | 157 | { TUNER_ABSENT, "LG TPI8NSR11F"}, |
156 | { TUNER_ABSENT, "Microtune 4049 FM5 Alt I2C"}, | 158 | { TUNER_ABSENT, "Microtune 4049 FM5 Alt I2C"}, |
157 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216ME MK3"}, | 159 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216ME MK3"}, |
158 | { TUNER_ABSENT, "Philips FI1236 MK3"}, | 160 | { TUNER_ABSENT, "Philips FI1236 MK3"}, |
159 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216 ME MK3"}, | 161 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216 ME MK3"}, |
160 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK3"}, | 162 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK3"}, |
161 | { TUNER_ABSENT, "Philips FM1216MP MK3"}, | 163 | { TUNER_ABSENT, "Philips FM1216MP MK3"}, |
162 | /* 60-69 */ | 164 | /* 60-69 */ |
163 | { TUNER_PHILIPS_FM1216ME_MK3, "LG S001D MK3"}, | 165 | { TUNER_PHILIPS_FM1216ME_MK3, "LG S001D MK3"}, |
164 | { TUNER_ABSENT, "LG M001D MK3"}, | 166 | { TUNER_ABSENT, "LG M001D MK3"}, |
165 | { TUNER_PHILIPS_FM1216ME_MK3, "LG S701D MK3"}, | 167 | { TUNER_PHILIPS_FM1216ME_MK3, "LG S701D MK3"}, |
166 | { TUNER_ABSENT, "LG M701D MK3"}, | 168 | { TUNER_ABSENT, "LG M701D MK3"}, |
167 | { TUNER_ABSENT, "Temic 4146FM5"}, | 169 | { TUNER_ABSENT, "Temic 4146FM5"}, |
168 | { TUNER_ABSENT, "Temic 4136FY5"}, | 170 | { TUNER_ABSENT, "Temic 4136FY5"}, |
169 | { TUNER_ABSENT, "Temic 4106FH5"}, | 171 | { TUNER_ABSENT, "Temic 4106FH5"}, |
170 | { TUNER_ABSENT, "Philips FQ1216LMP MK3"}, | 172 | { TUNER_ABSENT, "Philips FQ1216LMP MK3"}, |
171 | { TUNER_LG_NTSC_TAPE, "LG TAPE H001F MK3"}, | 173 | { TUNER_LG_NTSC_TAPE, "LG TAPE H001F MK3"}, |
172 | { TUNER_LG_NTSC_TAPE, "LG TAPE H701F MK3"}, | 174 | { TUNER_LG_NTSC_TAPE, "LG TAPE H701F MK3"}, |
173 | /* 70-79 */ | 175 | /* 70-79 */ |
174 | { TUNER_ABSENT, "LG TALN H200T"}, | 176 | { TUNER_ABSENT, "LG TALN H200T"}, |
175 | { TUNER_ABSENT, "LG TALN H250T"}, | 177 | { TUNER_ABSENT, "LG TALN H250T"}, |
176 | { TUNER_ABSENT, "LG TALN M200T"}, | 178 | { TUNER_ABSENT, "LG TALN M200T"}, |
177 | { TUNER_ABSENT, "LG TALN Z200T"}, | 179 | { TUNER_ABSENT, "LG TALN Z200T"}, |
178 | { TUNER_ABSENT, "LG TALN S200T"}, | 180 | { TUNER_ABSENT, "LG TALN S200T"}, |
179 | { TUNER_ABSENT, "Thompson DTT7595"}, | 181 | { TUNER_ABSENT, "Thompson DTT7595"}, |
180 | { TUNER_ABSENT, "Thompson DTT7592"}, | 182 | { TUNER_ABSENT, "Thompson DTT7592"}, |
181 | { TUNER_ABSENT, "Silicon TDA8275C1 8290"}, | 183 | { TUNER_ABSENT, "Silicon TDA8275C1 8290"}, |
182 | { TUNER_ABSENT, "Silicon TDA8275C1 8290 FM"}, | 184 | { TUNER_ABSENT, "Silicon TDA8275C1 8290 FM"}, |
183 | { TUNER_ABSENT, "Thompson DTT757"}, | 185 | { TUNER_ABSENT, "Thompson DTT757"}, |
184 | /* 80-89 */ | 186 | /* 80-89 */ |
185 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216LME MK3"}, | 187 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216LME MK3"}, |
186 | { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"}, | 188 | { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"}, |
187 | { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, | 189 | { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, |
188 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"}, | 190 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"}, |
189 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"}, | 191 | { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"}, |
190 | { TUNER_TCL_2002N, "TCL 2002N 6A"}, | 192 | { TUNER_TCL_2002N, "TCL 2002N 6A"}, |
191 | { TUNER_PHILIPS_FM1236_MK3, "Philips FQ1236 MK3"}, | 193 | { TUNER_PHILIPS_FM1236_MK3, "Philips FQ1236 MK3"}, |
192 | { TUNER_SAMSUNG_TCPN_2121P30A, "Samsung TCPN 2121P30A"}, | 194 | { TUNER_SAMSUNG_TCPN_2121P30A, "Samsung TCPN 2121P30A"}, |
193 | { TUNER_ABSENT, "Samsung TCPE 4121P30A"}, | 195 | { TUNER_ABSENT, "Samsung TCPE 4121P30A"}, |
194 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MFPE05 2"}, | 196 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MFPE05 2"}, |
195 | /* 90-99 */ | 197 | /* 90-99 */ |
196 | { TUNER_ABSENT, "LG TALN H202T"}, | 198 | { TUNER_ABSENT, "LG TALN H202T"}, |
197 | { TUNER_PHILIPS_FQ1216AME_MK4, "Philips FQ1216AME MK4"}, | 199 | { TUNER_PHILIPS_FQ1216AME_MK4, "Philips FQ1216AME MK4"}, |
198 | { TUNER_PHILIPS_FQ1236A_MK4, "Philips FQ1236A MK4"}, | 200 | { TUNER_PHILIPS_FQ1236A_MK4, "Philips FQ1236A MK4"}, |
199 | { TUNER_ABSENT, "Philips FQ1286A MK4"}, | 201 | { TUNER_ABSENT, "Philips FQ1286A MK4"}, |
200 | { TUNER_ABSENT, "Philips FQ1216ME MK5"}, | 202 | { TUNER_ABSENT, "Philips FQ1216ME MK5"}, |
201 | { TUNER_ABSENT, "Philips FQ1236 MK5"}, | 203 | { TUNER_ABSENT, "Philips FQ1236 MK5"}, |
202 | { TUNER_SAMSUNG_TCPG_6121P30A, "Samsung TCPG 6121P30A"}, | 204 | { TUNER_SAMSUNG_TCPG_6121P30A, "Samsung TCPG 6121P30A"}, |
203 | { TUNER_TCL_2002MB, "TCL 2002MB_3H"}, | 205 | { TUNER_TCL_2002MB, "TCL 2002MB_3H"}, |
204 | { TUNER_ABSENT, "TCL 2002MI_3H"}, | 206 | { TUNER_ABSENT, "TCL 2002MI_3H"}, |
205 | { TUNER_TCL_2002N, "TCL 2002N 5H"}, | 207 | { TUNER_TCL_2002N, "TCL 2002N 5H"}, |
206 | /* 100-109 */ | 208 | /* 100-109 */ |
207 | { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, | 209 | { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, |
208 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, | 210 | { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, |
209 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, | 211 | { TUNER_ABSENT, "Panasonic ENV57H12D5"}, |
210 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, | 212 | { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, |
211 | { TUNER_ABSENT, "TCL MNM05-4"}, | 213 | { TUNER_ABSENT, "TCL MNM05-4"}, |
212 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"}, | 214 | { TUNER_PHILIPS_FM1216ME_MK3, "TCL MPE05-2"}, |
213 | { TUNER_ABSENT, "TCL MQNM05-4"}, | 215 | { TUNER_ABSENT, "TCL MQNM05-4"}, |
214 | { TUNER_ABSENT, "LG TAPC-W701D"}, | 216 | { TUNER_ABSENT, "LG TAPC-W701D"}, |
215 | { TUNER_ABSENT, "TCL 9886P-WM"}, | 217 | { TUNER_ABSENT, "TCL 9886P-WM"}, |
216 | { TUNER_ABSENT, "TCL 1676NM-WM"}, | 218 | { TUNER_ABSENT, "TCL 1676NM-WM"}, |
217 | /* 110-119 */ | 219 | /* 110-119 */ |
218 | { TUNER_ABSENT, "Thompson DTT75105"}, | 220 | { TUNER_ABSENT, "Thompson DTT75105"}, |
219 | { TUNER_ABSENT, "Conexant_CX24109"}, | 221 | { TUNER_ABSENT, "Conexant_CX24109"}, |
220 | { TUNER_TCL_2002N, "TCL M2523_5N_E"}, | 222 | { TUNER_TCL_2002N, "TCL M2523_5N_E"}, |
221 | { TUNER_TCL_2002MB, "TCL M2523_3DB_E"}, | 223 | { TUNER_TCL_2002MB, "TCL M2523_3DB_E"}, |
222 | { TUNER_ABSENT, "Philips 8275A"}, | 224 | { TUNER_ABSENT, "Philips 8275A"}, |
223 | { TUNER_ABSENT, "Microtune MT2060"}, | 225 | { TUNER_ABSENT, "Microtune MT2060"}, |
224 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK5"}, | 226 | { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK5"}, |
225 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216ME MK5"}, | 227 | { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216ME MK5"}, |
226 | { TUNER_ABSENT, "TCL M2523_3DI_E"}, | 228 | { TUNER_ABSENT, "TCL M2523_3DI_E"}, |
227 | { TUNER_ABSENT, "Samsung THPD5222FG30A"}, | 229 | { TUNER_ABSENT, "Samsung THPD5222FG30A"}, |
228 | /* 120-129 */ | 230 | /* 120-129 */ |
229 | { TUNER_XC2028, "Xceive XC3028"}, | 231 | { TUNER_XC2028, "Xceive XC3028"}, |
230 | { TUNER_ABSENT, "Philips FQ1216LME MK5"}, | 232 | { TUNER_ABSENT, "Philips FQ1216LME MK5"}, |
231 | { TUNER_ABSENT, "Philips FQD1216LME"}, | 233 | { TUNER_ABSENT, "Philips FQD1216LME"}, |
232 | { TUNER_ABSENT, "Conexant CX24118A"}, | 234 | { TUNER_ABSENT, "Conexant CX24118A"}, |
233 | { TUNER_ABSENT, "TCL DMF11WIP"}, | 235 | { TUNER_ABSENT, "TCL DMF11WIP"}, |
234 | { TUNER_ABSENT, "TCL MFNM05_4H_E"}, | 236 | { TUNER_ABSENT, "TCL MFNM05_4H_E"}, |
235 | { TUNER_ABSENT, "TCL MNM05_4H_E"}, | 237 | { TUNER_ABSENT, "TCL MNM05_4H_E"}, |
236 | { TUNER_ABSENT, "TCL MPE05_2H_E"}, | 238 | { TUNER_ABSENT, "TCL MPE05_2H_E"}, |
237 | { TUNER_ABSENT, "TCL MQNM05_4_U"}, | 239 | { TUNER_ABSENT, "TCL MQNM05_4_U"}, |
238 | { TUNER_ABSENT, "TCL M2523_5NH_E"}, | 240 | { TUNER_ABSENT, "TCL M2523_5NH_E"}, |
239 | /* 130-139 */ | 241 | /* 130-139 */ |
240 | { TUNER_ABSENT, "TCL M2523_3DBH_E"}, | 242 | { TUNER_ABSENT, "TCL M2523_3DBH_E"}, |
241 | { TUNER_ABSENT, "TCL M2523_3DIH_E"}, | 243 | { TUNER_ABSENT, "TCL M2523_3DIH_E"}, |
242 | { TUNER_ABSENT, "TCL MFPE05_2_U"}, | 244 | { TUNER_ABSENT, "TCL MFPE05_2_U"}, |
243 | { TUNER_ABSENT, "Philips FMD1216MEX"}, | 245 | { TUNER_ABSENT, "Philips FMD1216MEX"}, |
244 | { TUNER_ABSENT, "Philips FRH2036B"}, | 246 | { TUNER_ABSENT, "Philips FRH2036B"}, |
245 | { TUNER_ABSENT, "Panasonic ENGF75_01GF"}, | 247 | { TUNER_ABSENT, "Panasonic ENGF75_01GF"}, |
246 | { TUNER_ABSENT, "MaxLinear MXL5005"}, | 248 | { TUNER_ABSENT, "MaxLinear MXL5005"}, |
247 | { TUNER_ABSENT, "MaxLinear MXL5003"}, | 249 | { TUNER_ABSENT, "MaxLinear MXL5003"}, |
248 | { TUNER_ABSENT, "Xceive XC2028"}, | 250 | { TUNER_ABSENT, "Xceive XC2028"}, |
249 | { TUNER_ABSENT, "Microtune MT2131"}, | 251 | { TUNER_ABSENT, "Microtune MT2131"}, |
250 | /* 140-149 */ | 252 | /* 140-149 */ |
251 | { TUNER_ABSENT, "Philips 8275A_8295"}, | 253 | { TUNER_ABSENT, "Philips 8275A_8295"}, |
252 | { TUNER_ABSENT, "TCL MF02GIP_5N_E"}, | 254 | { TUNER_ABSENT, "TCL MF02GIP_5N_E"}, |
253 | { TUNER_ABSENT, "TCL MF02GIP_3DB_E"}, | 255 | { TUNER_ABSENT, "TCL MF02GIP_3DB_E"}, |
254 | { TUNER_ABSENT, "TCL MF02GIP_3DI_E"}, | 256 | { TUNER_ABSENT, "TCL MF02GIP_3DI_E"}, |
255 | { TUNER_ABSENT, "Microtune MT2266"}, | 257 | { TUNER_ABSENT, "Microtune MT2266"}, |
256 | { TUNER_ABSENT, "TCL MF10WPP_4N_E"}, | 258 | { TUNER_ABSENT, "TCL MF10WPP_4N_E"}, |
257 | { TUNER_ABSENT, "LG TAPQ_H702F"}, | 259 | { TUNER_ABSENT, "LG TAPQ_H702F"}, |
258 | { TUNER_ABSENT, "TCL M09WPP_4N_E"}, | 260 | { TUNER_ABSENT, "TCL M09WPP_4N_E"}, |
259 | { TUNER_ABSENT, "MaxLinear MXL5005_v2"}, | 261 | { TUNER_ABSENT, "MaxLinear MXL5005_v2"}, |
260 | { TUNER_PHILIPS_TDA8290, "Philips 18271_8295"}, | 262 | { TUNER_PHILIPS_TDA8290, "Philips 18271_8295"}, |
261 | }; | 263 | }; |
262 | 264 | ||
263 | static struct HAUPPAUGE_AUDIOIC | 265 | static struct HAUPPAUGE_AUDIOIC |
@@ -344,37 +346,37 @@ static const char *decoderIC[] = { | |||
344 | static int hasRadioTuner(int tunerType) | 346 | static int hasRadioTuner(int tunerType) |
345 | { | 347 | { |
346 | switch (tunerType) { | 348 | switch (tunerType) { |
347 | case 18: //PNPEnv_TUNER_FR1236_MK2: | 349 | case 18: /* PNPEnv_TUNER_FR1236_MK2 */ |
348 | case 23: //PNPEnv_TUNER_FM1236: | 350 | case 23: /* PNPEnv_TUNER_FM1236 */ |
349 | case 38: //PNPEnv_TUNER_FMR1236: | 351 | case 38: /* PNPEnv_TUNER_FMR1236 */ |
350 | case 16: //PNPEnv_TUNER_FR1216_MK2: | 352 | case 16: /* PNPEnv_TUNER_FR1216_MK2 */ |
351 | case 19: //PNPEnv_TUNER_FR1246_MK2: | 353 | case 19: /* PNPEnv_TUNER_FR1246_MK2 */ |
352 | case 21: //PNPEnv_TUNER_FM1216: | 354 | case 21: /* PNPEnv_TUNER_FM1216 */ |
353 | case 24: //PNPEnv_TUNER_FM1246: | 355 | case 24: /* PNPEnv_TUNER_FM1246 */ |
354 | case 17: //PNPEnv_TUNER_FR1216MF_MK2: | 356 | case 17: /* PNPEnv_TUNER_FR1216MF_MK2 */ |
355 | case 22: //PNPEnv_TUNER_FM1216MF: | 357 | case 22: /* PNPEnv_TUNER_FM1216MF */ |
356 | case 20: //PNPEnv_TUNER_FR1256_MK2: | 358 | case 20: /* PNPEnv_TUNER_FR1256_MK2 */ |
357 | case 25: //PNPEnv_TUNER_FM1256: | 359 | case 25: /* PNPEnv_TUNER_FM1256 */ |
358 | case 33: //PNPEnv_TUNER_4039FR5: | 360 | case 33: /* PNPEnv_TUNER_4039FR5 */ |
359 | case 42: //PNPEnv_TUNER_4009FR5: | 361 | case 42: /* PNPEnv_TUNER_4009FR5 */ |
360 | case 52: //PNPEnv_TUNER_4049FM5: | 362 | case 52: /* PNPEnv_TUNER_4049FM5 */ |
361 | case 54: //PNPEnv_TUNER_4049FM5_AltI2C: | 363 | case 54: /* PNPEnv_TUNER_4049FM5_AltI2C */ |
362 | case 44: //PNPEnv_TUNER_4009FN5: | 364 | case 44: /* PNPEnv_TUNER_4009FN5 */ |
363 | case 31: //PNPEnv_TUNER_TCPB9085P: | 365 | case 31: /* PNPEnv_TUNER_TCPB9085P */ |
364 | case 30: //PNPEnv_TUNER_TCPN9085D: | 366 | case 30: /* PNPEnv_TUNER_TCPN9085D */ |
365 | case 46: //PNPEnv_TUNER_TP18NSR01F: | 367 | case 46: /* PNPEnv_TUNER_TP18NSR01F */ |
366 | case 47: //PNPEnv_TUNER_TP18PSB01D: | 368 | case 47: /* PNPEnv_TUNER_TP18PSB01D */ |
367 | case 49: //PNPEnv_TUNER_TAPC_I001D: | 369 | case 49: /* PNPEnv_TUNER_TAPC_I001D */ |
368 | case 60: //PNPEnv_TUNER_TAPE_S001D_MK3: | 370 | case 60: /* PNPEnv_TUNER_TAPE_S001D_MK3 */ |
369 | case 57: //PNPEnv_TUNER_FM1216ME_MK3: | 371 | case 57: /* PNPEnv_TUNER_FM1216ME_MK3 */ |
370 | case 59: //PNPEnv_TUNER_FM1216MP_MK3: | 372 | case 59: /* PNPEnv_TUNER_FM1216MP_MK3 */ |
371 | case 58: //PNPEnv_TUNER_FM1236_MK3: | 373 | case 58: /* PNPEnv_TUNER_FM1236_MK3 */ |
372 | case 68: //PNPEnv_TUNER_TAPE_H001F_MK3: | 374 | case 68: /* PNPEnv_TUNER_TAPE_H001F_MK3 */ |
373 | case 61: //PNPEnv_TUNER_TAPE_M001D_MK3: | 375 | case 61: /* PNPEnv_TUNER_TAPE_M001D_MK3 */ |
374 | case 78: //PNPEnv_TUNER_TDA8275C1_8290_FM: | 376 | case 78: /* PNPEnv_TUNER_TDA8275C1_8290_FM */ |
375 | case 89: //PNPEnv_TUNER_TCL_MFPE05_2: | 377 | case 89: /* PNPEnv_TUNER_TCL_MFPE05_2 */ |
376 | case 92: //PNPEnv_TUNER_PHILIPS_FQ1236A_MK4: | 378 | case 92: /* PNPEnv_TUNER_PHILIPS_FQ1236A_MK4 */ |
377 | case 105: | 379 | case 105: |
378 | return 1; | 380 | return 1; |
379 | } | 381 | } |
380 | return 0; | 382 | return 0; |
@@ -392,7 +394,8 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
392 | ** | 394 | ** |
393 | ** In our (ivtv) case we're interested in the following: | 395 | ** In our (ivtv) case we're interested in the following: |
394 | ** tuner type: tag [00].05 or [0a].01 (index into hauppauge_tuner) | 396 | ** tuner type: tag [00].05 or [0a].01 (index into hauppauge_tuner) |
395 | ** tuner fmts: tag [00].04 or [0a].00 (bitmask index into hauppauge_tuner_fmt) | 397 | ** tuner fmts: tag [00].04 or [0a].00 (bitmask index into |
398 | ** hauppauge_tuner_fmt) | ||
396 | ** radio: tag [00].{last} or [0e].00 (bitmask. bit2=FM) | 399 | ** radio: tag [00].{last} or [0e].00 (bitmask. bit2=FM) |
397 | ** audio proc: tag [02].01 or [05].00 (mask with 0x7f) | 400 | ** audio proc: tag [02].01 or [05].00 (mask with 0x7f) |
398 | ** decoder proc: tag [09].01) | 401 | ** decoder proc: tag [09].01) |
@@ -451,16 +454,17 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
451 | ++i; | 454 | ++i; |
452 | } else { | 455 | } else { |
453 | tveeprom_warn("Encountered bad packet header [%02x]. " | 456 | tveeprom_warn("Encountered bad packet header [%02x]. " |
454 | "Corrupt or not a Hauppauge eeprom.\n", eeprom_data[i]); | 457 | "Corrupt or not a Hauppauge eeprom.\n", |
458 | eeprom_data[i]); | ||
455 | return; | 459 | return; |
456 | } | 460 | } |
457 | 461 | ||
458 | if (debug) { | 462 | if (debug) { |
459 | tveeprom_info("Tag [%02x] + %d bytes:", eeprom_data[i], len - 1); | 463 | tveeprom_info("Tag [%02x] + %d bytes:", |
460 | for(j = 1; j < len; j++) { | 464 | eeprom_data[i], len - 1); |
461 | printk(" %02x", eeprom_data[i + j]); | 465 | for (j = 1; j < len; j++) |
462 | } | 466 | printk(KERN_CONT " %02x", eeprom_data[i + j]); |
463 | printk("\n"); | 467 | printk(KERN_CONT "\n"); |
464 | } | 468 | } |
465 | 469 | ||
466 | /* process by tag */ | 470 | /* process by tag */ |
@@ -511,16 +515,16 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
511 | (eeprom_data[i+6] << 8) + | 515 | (eeprom_data[i+6] << 8) + |
512 | (eeprom_data[i+7] << 16); | 516 | (eeprom_data[i+7] << 16); |
513 | 517 | ||
514 | if ( (eeprom_data[i + 8] & 0xf0) && | 518 | if ((eeprom_data[i + 8] & 0xf0) && |
515 | (tvee->serial_number < 0xffffff) ) { | 519 | (tvee->serial_number < 0xffffff)) { |
516 | tvee->MAC_address[0] = 0x00; | 520 | tvee->MAC_address[0] = 0x00; |
517 | tvee->MAC_address[1] = 0x0D; | 521 | tvee->MAC_address[1] = 0x0D; |
518 | tvee->MAC_address[2] = 0xFE; | 522 | tvee->MAC_address[2] = 0xFE; |
519 | tvee->MAC_address[3] = eeprom_data[i + 7]; | 523 | tvee->MAC_address[3] = eeprom_data[i + 7]; |
520 | tvee->MAC_address[4] = eeprom_data[i + 6]; | 524 | tvee->MAC_address[4] = eeprom_data[i + 6]; |
521 | tvee->MAC_address[5] = eeprom_data[i + 5]; | 525 | tvee->MAC_address[5] = eeprom_data[i + 5]; |
522 | tvee->has_MAC_address = 1; | 526 | tvee->has_MAC_address = 1; |
523 | } | 527 | } |
524 | break; | 528 | break; |
525 | 529 | ||
526 | case 0x05: | 530 | case 0x05: |
@@ -544,7 +548,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
544 | (eeprom_data[i + 3] << 16) + | 548 | (eeprom_data[i + 3] << 16) + |
545 | (eeprom_data[i + 4] << 24); | 549 | (eeprom_data[i + 4] << 24); |
546 | tvee->revision = | 550 | tvee->revision = |
547 | eeprom_data[i +5 ] + | 551 | eeprom_data[i + 5] + |
548 | (eeprom_data[i + 6] << 8) + | 552 | (eeprom_data[i + 6] << 8) + |
549 | (eeprom_data[i + 7] << 16); | 553 | (eeprom_data[i + 7] << 16); |
550 | break; | 554 | break; |
@@ -564,16 +568,16 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
564 | case 0x0a: | 568 | case 0x0a: |
565 | /* tag 'Tuner' */ | 569 | /* tag 'Tuner' */ |
566 | if (beenhere == 0) { | 570 | if (beenhere == 0) { |
567 | tuner1 = eeprom_data[i+2]; | 571 | tuner1 = eeprom_data[i + 2]; |
568 | t_format1 = eeprom_data[i+1]; | 572 | t_format1 = eeprom_data[i + 1]; |
569 | beenhere = 1; | 573 | beenhere = 1; |
570 | } else { | 574 | } else { |
571 | /* a second (radio) tuner may be present */ | 575 | /* a second (radio) tuner may be present */ |
572 | tuner2 = eeprom_data[i+2]; | 576 | tuner2 = eeprom_data[i + 2]; |
573 | t_format2 = eeprom_data[i+1]; | 577 | t_format2 = eeprom_data[i + 1]; |
574 | if (t_format2 == 0) { /* not a TV tuner? */ | 578 | /* not a TV tuner? */ |
579 | if (t_format2 == 0) | ||
575 | tvee->has_radio = 1; /* must be radio */ | 580 | tvee->has_radio = 1; /* must be radio */ |
576 | } | ||
577 | } | 581 | } |
578 | break; | 582 | break; |
579 | 583 | ||
@@ -601,7 +605,8 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
601 | /* case 0x12: tag 'InfoBits' */ | 605 | /* case 0x12: tag 'InfoBits' */ |
602 | 606 | ||
603 | default: | 607 | default: |
604 | tveeprom_dbg("Not sure what to do with tag [%02x]\n", tag); | 608 | tveeprom_dbg("Not sure what to do with tag [%02x]\n", |
609 | tag); | ||
605 | /* dump the rest of the packet? */ | 610 | /* dump the rest of the packet? */ |
606 | } | 611 | } |
607 | } | 612 | } |
@@ -615,7 +620,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
615 | tvee->rev_str[0] = 32 + ((tvee->revision >> 18) & 0x3f); | 620 | tvee->rev_str[0] = 32 + ((tvee->revision >> 18) & 0x3f); |
616 | tvee->rev_str[1] = 32 + ((tvee->revision >> 12) & 0x3f); | 621 | tvee->rev_str[1] = 32 + ((tvee->revision >> 12) & 0x3f); |
617 | tvee->rev_str[2] = 32 + ((tvee->revision >> 6) & 0x3f); | 622 | tvee->rev_str[2] = 32 + ((tvee->revision >> 6) & 0x3f); |
618 | tvee->rev_str[3] = 32 + ( tvee->revision & 0x3f); | 623 | tvee->rev_str[3] = 32 + (tvee->revision & 0x3f); |
619 | tvee->rev_str[4] = 0; | 624 | tvee->rev_str[4] = 0; |
620 | } | 625 | } |
621 | 626 | ||
@@ -658,44 +663,40 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
658 | 663 | ||
659 | tveeprom_info("Hauppauge model %d, rev %s, serial# %d\n", | 664 | tveeprom_info("Hauppauge model %d, rev %s, serial# %d\n", |
660 | tvee->model, tvee->rev_str, tvee->serial_number); | 665 | tvee->model, tvee->rev_str, tvee->serial_number); |
661 | if (tvee->has_MAC_address == 1) { | 666 | if (tvee->has_MAC_address == 1) |
662 | tveeprom_info("MAC address is %02X-%02X-%02X-%02X-%02X-%02X\n", | 667 | tveeprom_info("MAC address is %02X-%02X-%02X-%02X-%02X-%02X\n", |
663 | tvee->MAC_address[0], tvee->MAC_address[1], | 668 | tvee->MAC_address[0], tvee->MAC_address[1], |
664 | tvee->MAC_address[2], tvee->MAC_address[3], | 669 | tvee->MAC_address[2], tvee->MAC_address[3], |
665 | tvee->MAC_address[4], tvee->MAC_address[5]); | 670 | tvee->MAC_address[4], tvee->MAC_address[5]); |
666 | } | ||
667 | tveeprom_info("tuner model is %s (idx %d, type %d)\n", | 671 | tveeprom_info("tuner model is %s (idx %d, type %d)\n", |
668 | t_name1, tuner1, tvee->tuner_type); | 672 | t_name1, tuner1, tvee->tuner_type); |
669 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", | 673 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", |
670 | t_fmt_name1[0], t_fmt_name1[1], t_fmt_name1[2], t_fmt_name1[3], | 674 | t_fmt_name1[0], t_fmt_name1[1], t_fmt_name1[2], |
671 | t_fmt_name1[4], t_fmt_name1[5], t_fmt_name1[6], t_fmt_name1[7], | 675 | t_fmt_name1[3], t_fmt_name1[4], t_fmt_name1[5], |
672 | t_format1); | 676 | t_fmt_name1[6], t_fmt_name1[7], t_format1); |
673 | if (tuner2) { | 677 | if (tuner2) |
674 | tveeprom_info("second tuner model is %s (idx %d, type %d)\n", | 678 | tveeprom_info("second tuner model is %s (idx %d, type %d)\n", |
675 | t_name2, tuner2, tvee->tuner2_type); | 679 | t_name2, tuner2, tvee->tuner2_type); |
676 | } | 680 | if (t_format2) |
677 | if (t_format2) { | ||
678 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", | 681 | tveeprom_info("TV standards%s%s%s%s%s%s%s%s (eeprom 0x%02x)\n", |
679 | t_fmt_name2[0], t_fmt_name2[1], t_fmt_name2[2], t_fmt_name2[3], | 682 | t_fmt_name2[0], t_fmt_name2[1], t_fmt_name2[2], |
680 | t_fmt_name2[4], t_fmt_name2[5], t_fmt_name2[6], t_fmt_name2[7], | 683 | t_fmt_name2[3], t_fmt_name2[4], t_fmt_name2[5], |
681 | t_format2); | 684 | t_fmt_name2[6], t_fmt_name2[7], t_format2); |
682 | } | 685 | if (audioic < 0) { |
683 | if (audioic<0) { | ||
684 | tveeprom_info("audio processor is unknown (no idx)\n"); | 686 | tveeprom_info("audio processor is unknown (no idx)\n"); |
685 | tvee->audio_processor=AUDIO_CHIP_UNKNOWN; | 687 | tvee->audio_processor = AUDIO_CHIP_UNKNOWN; |
686 | } else { | 688 | } else { |
687 | if (audioic < ARRAY_SIZE(audioIC)) | 689 | if (audioic < ARRAY_SIZE(audioIC)) |
688 | tveeprom_info("audio processor is %s (idx %d)\n", | 690 | tveeprom_info("audio processor is %s (idx %d)\n", |
689 | audioIC[audioic].name,audioic); | 691 | audioIC[audioic].name, audioic); |
690 | else | 692 | else |
691 | tveeprom_info("audio processor is unknown (idx %d)\n", | 693 | tveeprom_info("audio processor is unknown (idx %d)\n", |
692 | audioic); | 694 | audioic); |
693 | } | 695 | } |
694 | if (tvee->decoder_processor) { | 696 | if (tvee->decoder_processor) |
695 | tveeprom_info("decoder processor is %s (idx %d)\n", | 697 | tveeprom_info("decoder processor is %s (idx %d)\n", |
696 | STRM(decoderIC, tvee->decoder_processor), | 698 | STRM(decoderIC, tvee->decoder_processor), |
697 | tvee->decoder_processor); | 699 | tvee->decoder_processor); |
698 | } | ||
699 | if (tvee->has_ir == -1) | 700 | if (tvee->has_ir == -1) |
700 | tveeprom_info("has %sradio\n", | 701 | tveeprom_info("has %sradio\n", |
701 | tvee->has_radio ? "" : "no "); | 702 | tvee->has_radio ? "" : "no "); |
@@ -716,11 +717,13 @@ int tveeprom_read(struct i2c_client *c, unsigned char *eedata, int len) | |||
716 | int err; | 717 | int err; |
717 | 718 | ||
718 | buf = 0; | 719 | buf = 0; |
719 | if (1 != (err = i2c_master_send(c, &buf, 1))) { | 720 | err = i2c_master_send(c, &buf, 1); |
721 | if (err != 1) { | ||
720 | tveeprom_info("Huh, no eeprom present (err=%d)?\n", err); | 722 | tveeprom_info("Huh, no eeprom present (err=%d)?\n", err); |
721 | return -1; | 723 | return -1; |
722 | } | 724 | } |
723 | if (len != (err = i2c_master_recv(c, eedata, len))) { | 725 | err = i2c_master_recv(c, eedata, len); |
726 | if (err != len) { | ||
724 | tveeprom_warn("i2c eeprom read error (err=%d)\n", err); | 727 | tveeprom_warn("i2c eeprom read error (err=%d)\n", err); |
725 | return -1; | 728 | return -1; |
726 | } | 729 | } |
@@ -731,9 +734,9 @@ int tveeprom_read(struct i2c_client *c, unsigned char *eedata, int len) | |||
731 | for (i = 0; i < len; i++) { | 734 | for (i = 0; i < len; i++) { |
732 | if (0 == (i % 16)) | 735 | if (0 == (i % 16)) |
733 | tveeprom_info("%02x:", i); | 736 | tveeprom_info("%02x:", i); |
734 | printk(" %02x", eedata[i]); | 737 | printk(KERN_CONT " %02x", eedata[i]); |
735 | if (15 == (i % 16)) | 738 | if (15 == (i % 16)) |
736 | printk("\n"); | 739 | printk(KERN_CONT "\n"); |
737 | } | 740 | } |
738 | } | 741 | } |
739 | return 0; | 742 | return 0; |
@@ -765,9 +768,9 @@ tveeprom_command(struct i2c_client *client, | |||
765 | 768 | ||
766 | switch (cmd) { | 769 | switch (cmd) { |
767 | case 0: | 770 | case 0: |
768 | buf = kzalloc(256,GFP_KERNEL); | 771 | buf = kzalloc(256, GFP_KERNEL); |
769 | tveeprom_read(client,buf,256); | 772 | tveeprom_read(client, buf, 256); |
770 | tveeprom_hauppauge_analog(client, &eeprom,buf); | 773 | tveeprom_hauppauge_analog(client, &eeprom, buf); |
771 | kfree(buf); | 774 | kfree(buf); |
772 | eeprom_props[0] = eeprom.tuner_type; | 775 | eeprom_props[0] = eeprom.tuner_type; |
773 | eeprom_props[1] = eeprom.tuner_formats; | 776 | eeprom_props[1] = eeprom.tuner_formats; |
@@ -801,7 +804,7 @@ tveeprom_detect_client(struct i2c_adapter *adapter, | |||
801 | } | 804 | } |
802 | 805 | ||
803 | static int | 806 | static int |
804 | tveeprom_attach_adapter (struct i2c_adapter *adapter) | 807 | tveeprom_attach_adapter(struct i2c_adapter *adapter) |
805 | { | 808 | { |
806 | if (adapter->class & I2C_CLASS_TV_ANALOG) | 809 | if (adapter->class & I2C_CLASS_TV_ANALOG) |
807 | return i2c_probe(adapter, &addr_data, tveeprom_detect_client); | 810 | return i2c_probe(adapter, &addr_data, tveeprom_detect_client); |
@@ -809,7 +812,7 @@ tveeprom_attach_adapter (struct i2c_adapter *adapter) | |||
809 | } | 812 | } |
810 | 813 | ||
811 | static int | 814 | static int |
812 | tveeprom_detach_client (struct i2c_client *client) | 815 | tveeprom_detach_client(struct i2c_client *client) |
813 | { | 816 | { |
814 | int err; | 817 | int err; |
815 | 818 | ||