diff options
Diffstat (limited to 'drivers/media/dvb/frontends/sp8870.c')
-rw-r--r-- | drivers/media/dvb/frontends/sp8870.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c index da876f7bfe32..aa78aa14aad9 100644 --- a/drivers/media/dvb/frontends/sp8870.c +++ b/drivers/media/dvb/frontends/sp8870.c | |||
@@ -70,7 +70,7 @@ static int sp8870_writereg (struct sp8870_state* state, u16 reg, u16 data) | |||
70 | int err; | 70 | int err; |
71 | 71 | ||
72 | if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { | 72 | if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { |
73 | dprintk ("%s: writereg error (err == %i, reg == 0x%02x, data == 0x%02x)\n", __FUNCTION__, err, reg, data); | 73 | dprintk ("%s: writereg error (err == %i, reg == 0x%02x, data == 0x%02x)\n", __func__, err, reg, data); |
74 | return -EREMOTEIO; | 74 | return -EREMOTEIO; |
75 | } | 75 | } |
76 | 76 | ||
@@ -88,7 +88,7 @@ static int sp8870_readreg (struct sp8870_state* state, u16 reg) | |||
88 | ret = i2c_transfer (state->i2c, msg, 2); | 88 | ret = i2c_transfer (state->i2c, msg, 2); |
89 | 89 | ||
90 | if (ret != 2) { | 90 | if (ret != 2) { |
91 | dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret); | 91 | dprintk("%s: readreg error (ret == %i)\n", __func__, ret); |
92 | return -1; | 92 | return -1; |
93 | } | 93 | } |
94 | 94 | ||
@@ -104,7 +104,7 @@ static int sp8870_firmware_upload (struct sp8870_state* state, const struct firm | |||
104 | int tx_len; | 104 | int tx_len; |
105 | int err = 0; | 105 | int err = 0; |
106 | 106 | ||
107 | dprintk ("%s: ...\n", __FUNCTION__); | 107 | dprintk ("%s: ...\n", __func__); |
108 | 108 | ||
109 | if (fw->size < SP8870_FIRMWARE_SIZE + SP8870_FIRMWARE_OFFSET) | 109 | if (fw->size < SP8870_FIRMWARE_SIZE + SP8870_FIRMWARE_OFFSET) |
110 | return -EINVAL; | 110 | return -EINVAL; |
@@ -131,14 +131,14 @@ static int sp8870_firmware_upload (struct sp8870_state* state, const struct firm | |||
131 | msg.buf = tx_buf; | 131 | msg.buf = tx_buf; |
132 | msg.len = tx_len + 2; | 132 | msg.len = tx_len + 2; |
133 | if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { | 133 | if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { |
134 | printk("%s: firmware upload failed!\n", __FUNCTION__); | 134 | printk("%s: firmware upload failed!\n", __func__); |
135 | printk ("%s: i2c error (err == %i)\n", __FUNCTION__, err); | 135 | printk ("%s: i2c error (err == %i)\n", __func__, err); |
136 | return err; | 136 | return err; |
137 | } | 137 | } |
138 | fw_pos += tx_len; | 138 | fw_pos += tx_len; |
139 | } | 139 | } |
140 | 140 | ||
141 | dprintk ("%s: done!\n", __FUNCTION__); | 141 | dprintk ("%s: done!\n", __func__); |
142 | return 0; | 142 | return 0; |
143 | }; | 143 | }; |
144 | 144 | ||
@@ -310,7 +310,7 @@ static int sp8870_init (struct dvb_frontend* fe) | |||
310 | if (state->initialised) return 0; | 310 | if (state->initialised) return 0; |
311 | state->initialised = 1; | 311 | state->initialised = 1; |
312 | 312 | ||
313 | dprintk ("%s\n", __FUNCTION__); | 313 | dprintk ("%s\n", __func__); |
314 | 314 | ||
315 | 315 | ||
316 | /* request the firmware, this will block until someone uploads it */ | 316 | /* request the firmware, this will block until someone uploads it */ |
@@ -449,15 +449,15 @@ static int sp8870_read_uncorrected_blocks (struct dvb_frontend* fe, u32* ublocks | |||
449 | return 0; | 449 | return 0; |
450 | } | 450 | } |
451 | 451 | ||
452 | // number of trials to recover from lockup | 452 | /* number of trials to recover from lockup */ |
453 | #define MAXTRIALS 5 | 453 | #define MAXTRIALS 5 |
454 | // maximum checks for data valid signal | 454 | /* maximum checks for data valid signal */ |
455 | #define MAXCHECKS 100 | 455 | #define MAXCHECKS 100 |
456 | 456 | ||
457 | // only for debugging: counter for detected lockups | 457 | /* only for debugging: counter for detected lockups */ |
458 | static int lockups = 0; | 458 | static int lockups; |
459 | // only for debugging: counter for channel switches | 459 | /* only for debugging: counter for channel switches */ |
460 | static int switches = 0; | 460 | static int switches; |
461 | 461 | ||
462 | static int sp8870_set_frontend (struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 462 | static int sp8870_set_frontend (struct dvb_frontend* fe, struct dvb_frontend_parameters *p) |
463 | { | 463 | { |
@@ -475,7 +475,7 @@ static int sp8870_set_frontend (struct dvb_frontend* fe, struct dvb_frontend_par | |||
475 | int trials = 0; | 475 | int trials = 0; |
476 | int check_count = 0; | 476 | int check_count = 0; |
477 | 477 | ||
478 | dprintk("%s: frequency = %i\n", __FUNCTION__, p->frequency); | 478 | dprintk("%s: frequency = %i\n", __func__, p->frequency); |
479 | 479 | ||
480 | for (trials = 1; trials <= MAXTRIALS; trials++) { | 480 | for (trials = 1; trials <= MAXTRIALS; trials++) { |
481 | 481 | ||
@@ -487,7 +487,7 @@ static int sp8870_set_frontend (struct dvb_frontend* fe, struct dvb_frontend_par | |||
487 | valid = sp8870_read_data_valid_signal(state); | 487 | valid = sp8870_read_data_valid_signal(state); |
488 | if (valid) { | 488 | if (valid) { |
489 | dprintk("%s: delay = %i usec\n", | 489 | dprintk("%s: delay = %i usec\n", |
490 | __FUNCTION__, check_count * 10); | 490 | __func__, check_count * 10); |
491 | break; | 491 | break; |
492 | } | 492 | } |
493 | udelay(10); | 493 | udelay(10); |
@@ -497,20 +497,20 @@ static int sp8870_set_frontend (struct dvb_frontend* fe, struct dvb_frontend_par | |||
497 | } | 497 | } |
498 | 498 | ||
499 | if (!valid) { | 499 | if (!valid) { |
500 | printk("%s: firmware crash!!!!!!\n", __FUNCTION__); | 500 | printk("%s: firmware crash!!!!!!\n", __func__); |
501 | return -EIO; | 501 | return -EIO; |
502 | } | 502 | } |
503 | 503 | ||
504 | if (debug) { | 504 | if (debug) { |
505 | if (valid) { | 505 | if (valid) { |
506 | if (trials > 1) { | 506 | if (trials > 1) { |
507 | printk("%s: firmware lockup!!!\n", __FUNCTION__); | 507 | printk("%s: firmware lockup!!!\n", __func__); |
508 | printk("%s: recovered after %i trial(s))\n", __FUNCTION__, trials - 1); | 508 | printk("%s: recovered after %i trial(s))\n", __func__, trials - 1); |
509 | lockups++; | 509 | lockups++; |
510 | } | 510 | } |
511 | } | 511 | } |
512 | switches++; | 512 | switches++; |
513 | printk("%s: switches = %i lockups = %i\n", __FUNCTION__, switches, lockups); | 513 | printk("%s: switches = %i lockups = %i\n", __func__, switches, lockups); |
514 | } | 514 | } |
515 | 515 | ||
516 | return 0; | 516 | return 0; |