aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stv0299.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/stv0299.c')
-rw-r--r--drivers/media/dvb/frontends/stv0299.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c
index 035dd7ba6519..f7c36741537d 100644
--- a/drivers/media/dvb/frontends/stv0299.c
+++ b/drivers/media/dvb/frontends/stv0299.c
@@ -86,7 +86,7 @@ static int stv0299_writeregI (struct stv0299_state* state, u8 reg, u8 data)
86 86
87 if (ret != 1) 87 if (ret != 1)
88 dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, " 88 dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, "
89 "ret == %i)\n", __FUNCTION__, reg, data, ret); 89 "ret == %i)\n", __func__, reg, data, ret);
90 90
91 return (ret != 1) ? -EREMOTEIO : 0; 91 return (ret != 1) ? -EREMOTEIO : 0;
92} 92}
@@ -113,7 +113,7 @@ static u8 stv0299_readreg (struct stv0299_state* state, u8 reg)
113 113
114 if (ret != 2) 114 if (ret != 2)
115 dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", 115 dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n",
116 __FUNCTION__, reg, ret); 116 __func__, reg, ret);
117 117
118 return b1[0]; 118 return b1[0];
119} 119}
@@ -127,14 +127,14 @@ static int stv0299_readregs (struct stv0299_state* state, u8 reg1, u8 *b, u8 len
127 ret = i2c_transfer (state->i2c, msg, 2); 127 ret = i2c_transfer (state->i2c, msg, 2);
128 128
129 if (ret != 2) 129 if (ret != 2)
130 dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret); 130 dprintk("%s: readreg error (ret == %i)\n", __func__, ret);
131 131
132 return ret == 2 ? 0 : ret; 132 return ret == 2 ? 0 : ret;
133} 133}
134 134
135static int stv0299_set_FEC (struct stv0299_state* state, fe_code_rate_t fec) 135static int stv0299_set_FEC (struct stv0299_state* state, fe_code_rate_t fec)
136{ 136{
137 dprintk ("%s\n", __FUNCTION__); 137 dprintk ("%s\n", __func__);
138 138
139 switch (fec) { 139 switch (fec) {
140 case FEC_AUTO: 140 case FEC_AUTO:
@@ -174,7 +174,7 @@ static fe_code_rate_t stv0299_get_fec (struct stv0299_state* state)
174 FEC_7_8, FEC_1_2 }; 174 FEC_7_8, FEC_1_2 };
175 u8 index; 175 u8 index;
176 176
177 dprintk ("%s\n", __FUNCTION__); 177 dprintk ("%s\n", __func__);
178 178
179 index = stv0299_readreg (state, 0x1b); 179 index = stv0299_readreg (state, 0x1b);
180 index &= 0x7; 180 index &= 0x7;
@@ -189,11 +189,11 @@ static int stv0299_wait_diseqc_fifo (struct stv0299_state* state, int timeout)
189{ 189{
190 unsigned long start = jiffies; 190 unsigned long start = jiffies;
191 191
192 dprintk ("%s\n", __FUNCTION__); 192 dprintk ("%s\n", __func__);
193 193
194 while (stv0299_readreg(state, 0x0a) & 1) { 194 while (stv0299_readreg(state, 0x0a) & 1) {
195 if (jiffies - start > timeout) { 195 if (jiffies - start > timeout) {
196 dprintk ("%s: timeout!!\n", __FUNCTION__); 196 dprintk ("%s: timeout!!\n", __func__);
197 return -ETIMEDOUT; 197 return -ETIMEDOUT;
198 } 198 }
199 msleep(10); 199 msleep(10);
@@ -206,11 +206,11 @@ static int stv0299_wait_diseqc_idle (struct stv0299_state* state, int timeout)
206{ 206{
207 unsigned long start = jiffies; 207 unsigned long start = jiffies;
208 208
209 dprintk ("%s\n", __FUNCTION__); 209 dprintk ("%s\n", __func__);
210 210
211 while ((stv0299_readreg(state, 0x0a) & 3) != 2 ) { 211 while ((stv0299_readreg(state, 0x0a) & 3) != 2 ) {
212 if (jiffies - start > timeout) { 212 if (jiffies - start > timeout) {
213 dprintk ("%s: timeout!!\n", __FUNCTION__); 213 dprintk ("%s: timeout!!\n", __func__);
214 return -ETIMEDOUT; 214 return -ETIMEDOUT;
215 } 215 }
216 msleep(10); 216 msleep(10);
@@ -245,7 +245,7 @@ static int stv0299_get_symbolrate (struct stv0299_state* state)
245 u8 sfr[3]; 245 u8 sfr[3];
246 s8 rtf; 246 s8 rtf;
247 247
248 dprintk ("%s\n", __FUNCTION__); 248 dprintk ("%s\n", __func__);
249 249
250 stv0299_readregs (state, 0x1f, sfr, 3); 250 stv0299_readregs (state, 0x1f, sfr, 3);
251 stv0299_readregs (state, 0x1a, (u8 *)&rtf, 1); 251 stv0299_readregs (state, 0x1a, (u8 *)&rtf, 1);
@@ -257,8 +257,8 @@ static int stv0299_get_symbolrate (struct stv0299_state* state)
257 offset = (s32) rtf * (srate / 4096L); 257 offset = (s32) rtf * (srate / 4096L);
258 offset /= 128; 258 offset /= 128;
259 259
260 dprintk ("%s : srate = %i\n", __FUNCTION__, srate); 260 dprintk ("%s : srate = %i\n", __func__, srate);
261 dprintk ("%s : ofset = %i\n", __FUNCTION__, offset); 261 dprintk ("%s : ofset = %i\n", __func__, offset);
262 262
263 srate += offset; 263 srate += offset;
264 264
@@ -276,7 +276,7 @@ static int stv0299_send_diseqc_msg (struct dvb_frontend* fe,
276 u8 val; 276 u8 val;
277 int i; 277 int i;
278 278
279 dprintk ("%s\n", __FUNCTION__); 279 dprintk ("%s\n", __func__);
280 280
281 if (stv0299_wait_diseqc_idle (state, 100) < 0) 281 if (stv0299_wait_diseqc_idle (state, 100) < 0)
282 return -ETIMEDOUT; 282 return -ETIMEDOUT;
@@ -305,7 +305,7 @@ static int stv0299_send_diseqc_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t
305 struct stv0299_state* state = fe->demodulator_priv; 305 struct stv0299_state* state = fe->demodulator_priv;
306 u8 val; 306 u8 val;
307 307
308 dprintk ("%s\n", __FUNCTION__); 308 dprintk ("%s\n", __func__);
309 309
310 if (stv0299_wait_diseqc_idle (state, 100) < 0) 310 if (stv0299_wait_diseqc_idle (state, 100) < 0)
311 return -ETIMEDOUT; 311 return -ETIMEDOUT;
@@ -355,7 +355,7 @@ static int stv0299_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltag
355 u8 reg0x08; 355 u8 reg0x08;
356 u8 reg0x0c; 356 u8 reg0x0c;
357 357
358 dprintk("%s: %s\n", __FUNCTION__, 358 dprintk("%s: %s\n", __func__,
359 voltage == SEC_VOLTAGE_13 ? "SEC_VOLTAGE_13" : 359 voltage == SEC_VOLTAGE_13 ? "SEC_VOLTAGE_13" :
360 voltage == SEC_VOLTAGE_18 ? "SEC_VOLTAGE_18" : "??"); 360 voltage == SEC_VOLTAGE_18 ? "SEC_VOLTAGE_18" : "??");
361 361
@@ -408,7 +408,7 @@ static int stv0299_send_legacy_dish_cmd (struct dvb_frontend* fe, unsigned long
408 408
409 cmd = cmd << 1; 409 cmd = cmd << 1;
410 if (debug_legacy_dish_switch) 410 if (debug_legacy_dish_switch)
411 printk ("%s switch command: 0x%04lx\n",__FUNCTION__, cmd); 411 printk ("%s switch command: 0x%04lx\n",__func__, cmd);
412 412
413 do_gettimeofday (&nexttime); 413 do_gettimeofday (&nexttime);
414 if (debug_legacy_dish_switch) 414 if (debug_legacy_dish_switch)
@@ -433,7 +433,7 @@ static int stv0299_send_legacy_dish_cmd (struct dvb_frontend* fe, unsigned long
433 } 433 }
434 if (debug_legacy_dish_switch) { 434 if (debug_legacy_dish_switch) {
435 printk ("%s(%d): switch delay (should be 32k followed by all 8k\n", 435 printk ("%s(%d): switch delay (should be 32k followed by all 8k\n",
436 __FUNCTION__, fe->dvb->num); 436 __func__, fe->dvb->num);
437 for (i = 1; i < 10; i++) 437 for (i = 1; i < 10; i++)
438 printk ("%d: %d\n", i, timeval_usec_diff(tv[i-1] , tv[i])); 438 printk ("%d: %d\n", i, timeval_usec_diff(tv[i-1] , tv[i]));
439 } 439 }
@@ -461,7 +461,7 @@ static int stv0299_read_status(struct dvb_frontend* fe, fe_status_t* status)
461 u8 signal = 0xff - stv0299_readreg (state, 0x18); 461 u8 signal = 0xff - stv0299_readreg (state, 0x18);
462 u8 sync = stv0299_readreg (state, 0x1b); 462 u8 sync = stv0299_readreg (state, 0x1b);
463 463
464 dprintk ("%s : FE_READ_STATUS : VSTATUS: 0x%02x\n", __FUNCTION__, sync); 464 dprintk ("%s : FE_READ_STATUS : VSTATUS: 0x%02x\n", __func__, sync);
465 *status = 0; 465 *status = 0;
466 466
467 if (signal > 10) 467 if (signal > 10)
@@ -499,7 +499,7 @@ static int stv0299_read_signal_strength(struct dvb_frontend* fe, u16* strength)
499 s32 signal = 0xffff - ((stv0299_readreg (state, 0x18) << 8) 499 s32 signal = 0xffff - ((stv0299_readreg (state, 0x18) << 8)
500 | stv0299_readreg (state, 0x19)); 500 | stv0299_readreg (state, 0x19));
501 501
502 dprintk ("%s : FE_READ_SIGNAL_STRENGTH : AGC2I: 0x%02x%02x, signal=0x%04x\n", __FUNCTION__, 502 dprintk ("%s : FE_READ_SIGNAL_STRENGTH : AGC2I: 0x%02x%02x, signal=0x%04x\n", __func__,
503 stv0299_readreg (state, 0x18), 503 stv0299_readreg (state, 0x18),
504 stv0299_readreg (state, 0x19), (int) signal); 504 stv0299_readreg (state, 0x19), (int) signal);
505 505
@@ -536,7 +536,7 @@ static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
536 struct stv0299_state* state = fe->demodulator_priv; 536 struct stv0299_state* state = fe->demodulator_priv;
537 int invval = 0; 537 int invval = 0;
538 538
539 dprintk ("%s : FE_SET_FRONTEND\n", __FUNCTION__); 539 dprintk ("%s : FE_SET_FRONTEND\n", __func__);
540 540
541 // set the inversion 541 // set the inversion
542 if (p->inversion == INVERSION_OFF) invval = 0; 542 if (p->inversion == INVERSION_OFF) invval = 0;