diff options
author | Antti Palosaari <crope@iki.fi> | 2012-07-02 02:46:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-05 12:00:43 -0400 |
commit | 279bba0fbd6d00e37655e59b3636e1d95e848814 (patch) | |
tree | d0042ed050087ff25f6380c047003cb2be2557f8 /drivers/media/dvb/frontends/tda10071.c | |
parent | 21c8ba39ab775a9a1ff031d9418967c5731049a4 (diff) |
[media] tda10071: convert Kernel dev_* logging
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/tda10071.c')
-rw-r--r-- | drivers/media/dvb/frontends/tda10071.c | 133 |
1 files changed, 75 insertions, 58 deletions
diff --git a/drivers/media/dvb/frontends/tda10071.c b/drivers/media/dvb/frontends/tda10071.c index bccfcf7d20d7..703c3d05f9f4 100644 --- a/drivers/media/dvb/frontends/tda10071.c +++ b/drivers/media/dvb/frontends/tda10071.c | |||
@@ -20,10 +20,6 @@ | |||
20 | 20 | ||
21 | #include "tda10071_priv.h" | 21 | #include "tda10071_priv.h" |
22 | 22 | ||
23 | int tda10071_debug; | ||
24 | module_param_named(debug, tda10071_debug, int, 0644); | ||
25 | MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); | ||
26 | |||
27 | static struct dvb_frontend_ops tda10071_ops; | 23 | static struct dvb_frontend_ops tda10071_ops; |
28 | 24 | ||
29 | /* write multiple registers */ | 25 | /* write multiple registers */ |
@@ -48,7 +44,8 @@ static int tda10071_wr_regs(struct tda10071_priv *priv, u8 reg, u8 *val, | |||
48 | if (ret == 1) { | 44 | if (ret == 1) { |
49 | ret = 0; | 45 | ret = 0; |
50 | } else { | 46 | } else { |
51 | warn("i2c wr failed=%d reg=%02x len=%d", ret, reg, len); | 47 | dev_warn(&priv->i2c->dev, "%s: i2c wr failed=%d reg=%02x " \ |
48 | "len=%d\n", KBUILD_MODNAME, ret, reg, len); | ||
52 | ret = -EREMOTEIO; | 49 | ret = -EREMOTEIO; |
53 | } | 50 | } |
54 | return ret; | 51 | return ret; |
@@ -79,7 +76,8 @@ static int tda10071_rd_regs(struct tda10071_priv *priv, u8 reg, u8 *val, | |||
79 | memcpy(val, buf, len); | 76 | memcpy(val, buf, len); |
80 | ret = 0; | 77 | ret = 0; |
81 | } else { | 78 | } else { |
82 | warn("i2c rd failed=%d reg=%02x len=%d", ret, reg, len); | 79 | dev_warn(&priv->i2c->dev, "%s: i2c rd failed=%d reg=%02x " \ |
80 | "len=%d\n", KBUILD_MODNAME, ret, reg, len); | ||
83 | ret = -EREMOTEIO; | 81 | ret = -EREMOTEIO; |
84 | } | 82 | } |
85 | return ret; | 83 | return ret; |
@@ -170,7 +168,7 @@ static int tda10071_cmd_execute(struct tda10071_priv *priv, | |||
170 | usleep_range(200, 5000); | 168 | usleep_range(200, 5000); |
171 | } | 169 | } |
172 | 170 | ||
173 | dbg("%s: loop=%d", __func__, i); | 171 | dev_dbg(&priv->i2c->dev, "%s: loop=%d\n", __func__, i); |
174 | 172 | ||
175 | if (i == 0) { | 173 | if (i == 0) { |
176 | ret = -ETIMEDOUT; | 174 | ret = -ETIMEDOUT; |
@@ -179,7 +177,7 @@ static int tda10071_cmd_execute(struct tda10071_priv *priv, | |||
179 | 177 | ||
180 | return ret; | 178 | return ret; |
181 | error: | 179 | error: |
182 | dbg("%s: failed=%d", __func__, ret); | 180 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
183 | return ret; | 181 | return ret; |
184 | } | 182 | } |
185 | 183 | ||
@@ -196,7 +194,8 @@ static int tda10071_set_tone(struct dvb_frontend *fe, | |||
196 | goto error; | 194 | goto error; |
197 | } | 195 | } |
198 | 196 | ||
199 | dbg("%s: tone_mode=%d", __func__, fe_sec_tone_mode); | 197 | dev_dbg(&priv->i2c->dev, "%s: tone_mode=%d\n", __func__, |
198 | fe_sec_tone_mode); | ||
200 | 199 | ||
201 | switch (fe_sec_tone_mode) { | 200 | switch (fe_sec_tone_mode) { |
202 | case SEC_TONE_ON: | 201 | case SEC_TONE_ON: |
@@ -206,7 +205,8 @@ static int tda10071_set_tone(struct dvb_frontend *fe, | |||
206 | tone = 0; | 205 | tone = 0; |
207 | break; | 206 | break; |
208 | default: | 207 | default: |
209 | dbg("%s: invalid fe_sec_tone_mode", __func__); | 208 | dev_dbg(&priv->i2c->dev, "%s: invalid fe_sec_tone_mode\n", |
209 | __func__); | ||
210 | ret = -EINVAL; | 210 | ret = -EINVAL; |
211 | goto error; | 211 | goto error; |
212 | } | 212 | } |
@@ -223,7 +223,7 @@ static int tda10071_set_tone(struct dvb_frontend *fe, | |||
223 | 223 | ||
224 | return ret; | 224 | return ret; |
225 | error: | 225 | error: |
226 | dbg("%s: failed=%d", __func__, ret); | 226 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
227 | return ret; | 227 | return ret; |
228 | } | 228 | } |
229 | 229 | ||
@@ -240,7 +240,7 @@ static int tda10071_set_voltage(struct dvb_frontend *fe, | |||
240 | goto error; | 240 | goto error; |
241 | } | 241 | } |
242 | 242 | ||
243 | dbg("%s: voltage=%d", __func__, fe_sec_voltage); | 243 | dev_dbg(&priv->i2c->dev, "%s: voltage=%d\n", __func__, fe_sec_voltage); |
244 | 244 | ||
245 | switch (fe_sec_voltage) { | 245 | switch (fe_sec_voltage) { |
246 | case SEC_VOLTAGE_13: | 246 | case SEC_VOLTAGE_13: |
@@ -253,7 +253,8 @@ static int tda10071_set_voltage(struct dvb_frontend *fe, | |||
253 | voltage = 0; | 253 | voltage = 0; |
254 | break; | 254 | break; |
255 | default: | 255 | default: |
256 | dbg("%s: invalid fe_sec_voltage", __func__); | 256 | dev_dbg(&priv->i2c->dev, "%s: invalid fe_sec_voltage\n", |
257 | __func__); | ||
257 | ret = -EINVAL; | 258 | ret = -EINVAL; |
258 | goto error; | 259 | goto error; |
259 | }; | 260 | }; |
@@ -268,7 +269,7 @@ static int tda10071_set_voltage(struct dvb_frontend *fe, | |||
268 | 269 | ||
269 | return ret; | 270 | return ret; |
270 | error: | 271 | error: |
271 | dbg("%s: failed=%d", __func__, ret); | 272 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
272 | return ret; | 273 | return ret; |
273 | } | 274 | } |
274 | 275 | ||
@@ -285,7 +286,8 @@ static int tda10071_diseqc_send_master_cmd(struct dvb_frontend *fe, | |||
285 | goto error; | 286 | goto error; |
286 | } | 287 | } |
287 | 288 | ||
288 | dbg("%s: msg_len=%d", __func__, diseqc_cmd->msg_len); | 289 | dev_dbg(&priv->i2c->dev, "%s: msg_len=%d\n", __func__, |
290 | diseqc_cmd->msg_len); | ||
289 | 291 | ||
290 | if (diseqc_cmd->msg_len < 3 || diseqc_cmd->msg_len > 6) { | 292 | if (diseqc_cmd->msg_len < 3 || diseqc_cmd->msg_len > 6) { |
291 | ret = -EINVAL; | 293 | ret = -EINVAL; |
@@ -301,7 +303,7 @@ static int tda10071_diseqc_send_master_cmd(struct dvb_frontend *fe, | |||
301 | usleep_range(10000, 20000); | 303 | usleep_range(10000, 20000); |
302 | } | 304 | } |
303 | 305 | ||
304 | dbg("%s: loop=%d", __func__, i); | 306 | dev_dbg(&priv->i2c->dev, "%s: loop=%d\n", __func__, i); |
305 | 307 | ||
306 | if (i == 0) { | 308 | if (i == 0) { |
307 | ret = -ETIMEDOUT; | 309 | ret = -ETIMEDOUT; |
@@ -327,7 +329,7 @@ static int tda10071_diseqc_send_master_cmd(struct dvb_frontend *fe, | |||
327 | 329 | ||
328 | return ret; | 330 | return ret; |
329 | error: | 331 | error: |
330 | dbg("%s: failed=%d", __func__, ret); | 332 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
331 | return ret; | 333 | return ret; |
332 | } | 334 | } |
333 | 335 | ||
@@ -344,7 +346,7 @@ static int tda10071_diseqc_recv_slave_reply(struct dvb_frontend *fe, | |||
344 | goto error; | 346 | goto error; |
345 | } | 347 | } |
346 | 348 | ||
347 | dbg("%s:", __func__); | 349 | dev_dbg(&priv->i2c->dev, "%s:\n", __func__); |
348 | 350 | ||
349 | /* wait LNB RX */ | 351 | /* wait LNB RX */ |
350 | for (i = 500, tmp = 0; i && !tmp; i--) { | 352 | for (i = 500, tmp = 0; i && !tmp; i--) { |
@@ -355,7 +357,7 @@ static int tda10071_diseqc_recv_slave_reply(struct dvb_frontend *fe, | |||
355 | usleep_range(10000, 20000); | 357 | usleep_range(10000, 20000); |
356 | } | 358 | } |
357 | 359 | ||
358 | dbg("%s: loop=%d", __func__, i); | 360 | dev_dbg(&priv->i2c->dev, "%s: loop=%d\n", __func__, i); |
359 | 361 | ||
360 | if (i == 0) { | 362 | if (i == 0) { |
361 | ret = -ETIMEDOUT; | 363 | ret = -ETIMEDOUT; |
@@ -385,7 +387,7 @@ static int tda10071_diseqc_recv_slave_reply(struct dvb_frontend *fe, | |||
385 | 387 | ||
386 | return ret; | 388 | return ret; |
387 | error: | 389 | error: |
388 | dbg("%s: failed=%d", __func__, ret); | 390 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
389 | return ret; | 391 | return ret; |
390 | } | 392 | } |
391 | 393 | ||
@@ -402,7 +404,8 @@ static int tda10071_diseqc_send_burst(struct dvb_frontend *fe, | |||
402 | goto error; | 404 | goto error; |
403 | } | 405 | } |
404 | 406 | ||
405 | dbg("%s: fe_sec_mini_cmd=%d", __func__, fe_sec_mini_cmd); | 407 | dev_dbg(&priv->i2c->dev, "%s: fe_sec_mini_cmd=%d\n", __func__, |
408 | fe_sec_mini_cmd); | ||
406 | 409 | ||
407 | switch (fe_sec_mini_cmd) { | 410 | switch (fe_sec_mini_cmd) { |
408 | case SEC_MINI_A: | 411 | case SEC_MINI_A: |
@@ -412,7 +415,8 @@ static int tda10071_diseqc_send_burst(struct dvb_frontend *fe, | |||
412 | burst = 1; | 415 | burst = 1; |
413 | break; | 416 | break; |
414 | default: | 417 | default: |
415 | dbg("%s: invalid fe_sec_mini_cmd", __func__); | 418 | dev_dbg(&priv->i2c->dev, "%s: invalid fe_sec_mini_cmd\n", |
419 | __func__); | ||
416 | ret = -EINVAL; | 420 | ret = -EINVAL; |
417 | goto error; | 421 | goto error; |
418 | } | 422 | } |
@@ -426,7 +430,7 @@ static int tda10071_diseqc_send_burst(struct dvb_frontend *fe, | |||
426 | usleep_range(10000, 20000); | 430 | usleep_range(10000, 20000); |
427 | } | 431 | } |
428 | 432 | ||
429 | dbg("%s: loop=%d", __func__, i); | 433 | dev_dbg(&priv->i2c->dev, "%s: loop=%d\n", __func__, i); |
430 | 434 | ||
431 | if (i == 0) { | 435 | if (i == 0) { |
432 | ret = -ETIMEDOUT; | 436 | ret = -ETIMEDOUT; |
@@ -447,7 +451,7 @@ static int tda10071_diseqc_send_burst(struct dvb_frontend *fe, | |||
447 | 451 | ||
448 | return ret; | 452 | return ret; |
449 | error: | 453 | error: |
450 | dbg("%s: failed=%d", __func__, ret); | 454 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
451 | return ret; | 455 | return ret; |
452 | } | 456 | } |
453 | 457 | ||
@@ -481,7 +485,7 @@ static int tda10071_read_status(struct dvb_frontend *fe, fe_status_t *status) | |||
481 | 485 | ||
482 | return ret; | 486 | return ret; |
483 | error: | 487 | error: |
484 | dbg("%s: failed=%d", __func__, ret); | 488 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
485 | return ret; | 489 | return ret; |
486 | } | 490 | } |
487 | 491 | ||
@@ -506,7 +510,7 @@ static int tda10071_read_snr(struct dvb_frontend *fe, u16 *snr) | |||
506 | 510 | ||
507 | return ret; | 511 | return ret; |
508 | error: | 512 | error: |
509 | dbg("%s: failed=%d", __func__, ret); | 513 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
510 | return ret; | 514 | return ret; |
511 | } | 515 | } |
512 | 516 | ||
@@ -545,7 +549,7 @@ static int tda10071_read_signal_strength(struct dvb_frontend *fe, u16 *strength) | |||
545 | 549 | ||
546 | return ret; | 550 | return ret; |
547 | error: | 551 | error: |
548 | dbg("%s: failed=%d", __func__, ret); | 552 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
549 | return ret; | 553 | return ret; |
550 | } | 554 | } |
551 | 555 | ||
@@ -583,7 +587,8 @@ static int tda10071_read_ber(struct dvb_frontend *fe, u32 *ber) | |||
583 | goto error; | 587 | goto error; |
584 | 588 | ||
585 | if (priv->meas_count[i] == tmp) { | 589 | if (priv->meas_count[i] == tmp) { |
586 | dbg("%s: meas not ready=%02x", __func__, tmp); | 590 | dev_dbg(&priv->i2c->dev, "%s: meas not ready=%02x\n", __func__, |
591 | tmp); | ||
587 | *ber = priv->ber; | 592 | *ber = priv->ber; |
588 | return 0; | 593 | return 0; |
589 | } else { | 594 | } else { |
@@ -612,7 +617,7 @@ static int tda10071_read_ber(struct dvb_frontend *fe, u32 *ber) | |||
612 | 617 | ||
613 | return ret; | 618 | return ret; |
614 | error: | 619 | error: |
615 | dbg("%s: failed=%d", __func__, ret); | 620 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
616 | return ret; | 621 | return ret; |
617 | } | 622 | } |
618 | 623 | ||
@@ -632,7 +637,7 @@ static int tda10071_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) | |||
632 | 637 | ||
633 | return ret; | 638 | return ret; |
634 | error: | 639 | error: |
635 | dbg("%s: failed=%d", __func__, ret); | 640 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
636 | return ret; | 641 | return ret; |
637 | } | 642 | } |
638 | 643 | ||
@@ -644,10 +649,11 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) | |||
644 | int ret, i; | 649 | int ret, i; |
645 | u8 mode, rolloff, pilot, inversion, div; | 650 | u8 mode, rolloff, pilot, inversion, div; |
646 | 651 | ||
647 | dbg("%s: delivery_system=%d modulation=%d frequency=%d " \ | 652 | dev_dbg(&priv->i2c->dev, "%s: delivery_system=%d modulation=%d " \ |
648 | "symbol_rate=%d inversion=%d pilot=%d rolloff=%d", __func__, | 653 | "frequency=%d symbol_rate=%d inversion=%d pilot=%d " \ |
649 | c->delivery_system, c->modulation, c->frequency, | 654 | "rolloff=%d\n", __func__, c->delivery_system, c->modulation, |
650 | c->symbol_rate, c->inversion, c->pilot, c->rolloff); | 655 | c->frequency, c->symbol_rate, c->inversion, c->pilot, |
656 | c->rolloff); | ||
651 | 657 | ||
652 | priv->delivery_system = SYS_UNDEFINED; | 658 | priv->delivery_system = SYS_UNDEFINED; |
653 | 659 | ||
@@ -669,7 +675,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) | |||
669 | inversion = 3; | 675 | inversion = 3; |
670 | break; | 676 | break; |
671 | default: | 677 | default: |
672 | dbg("%s: invalid inversion", __func__); | 678 | dev_dbg(&priv->i2c->dev, "%s: invalid inversion\n", __func__); |
673 | ret = -EINVAL; | 679 | ret = -EINVAL; |
674 | goto error; | 680 | goto error; |
675 | } | 681 | } |
@@ -692,7 +698,8 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) | |||
692 | break; | 698 | break; |
693 | case ROLLOFF_AUTO: | 699 | case ROLLOFF_AUTO: |
694 | default: | 700 | default: |
695 | dbg("%s: invalid rolloff", __func__); | 701 | dev_dbg(&priv->i2c->dev, "%s: invalid rolloff\n", |
702 | __func__); | ||
696 | ret = -EINVAL; | 703 | ret = -EINVAL; |
697 | goto error; | 704 | goto error; |
698 | } | 705 | } |
@@ -708,13 +715,15 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) | |||
708 | pilot = 2; | 715 | pilot = 2; |
709 | break; | 716 | break; |
710 | default: | 717 | default: |
711 | dbg("%s: invalid pilot", __func__); | 718 | dev_dbg(&priv->i2c->dev, "%s: invalid pilot\n", |
719 | __func__); | ||
712 | ret = -EINVAL; | 720 | ret = -EINVAL; |
713 | goto error; | 721 | goto error; |
714 | } | 722 | } |
715 | break; | 723 | break; |
716 | default: | 724 | default: |
717 | dbg("%s: invalid delivery_system", __func__); | 725 | dev_dbg(&priv->i2c->dev, "%s: invalid delivery_system\n", |
726 | __func__); | ||
718 | ret = -EINVAL; | 727 | ret = -EINVAL; |
719 | goto error; | 728 | goto error; |
720 | } | 729 | } |
@@ -724,13 +733,15 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) | |||
724 | c->modulation == TDA10071_MODCOD[i].modulation && | 733 | c->modulation == TDA10071_MODCOD[i].modulation && |
725 | c->fec_inner == TDA10071_MODCOD[i].fec) { | 734 | c->fec_inner == TDA10071_MODCOD[i].fec) { |
726 | mode = TDA10071_MODCOD[i].val; | 735 | mode = TDA10071_MODCOD[i].val; |
727 | dbg("%s: mode found=%02x", __func__, mode); | 736 | dev_dbg(&priv->i2c->dev, "%s: mode found=%02x\n", |
737 | __func__, mode); | ||
728 | break; | 738 | break; |
729 | } | 739 | } |
730 | } | 740 | } |
731 | 741 | ||
732 | if (mode == 0xff) { | 742 | if (mode == 0xff) { |
733 | dbg("%s: invalid parameter combination", __func__); | 743 | dev_dbg(&priv->i2c->dev, "%s: invalid parameter combination\n", |
744 | __func__); | ||
734 | ret = -EINVAL; | 745 | ret = -EINVAL; |
735 | goto error; | 746 | goto error; |
736 | } | 747 | } |
@@ -772,7 +783,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) | |||
772 | 783 | ||
773 | return ret; | 784 | return ret; |
774 | error: | 785 | error: |
775 | dbg("%s: failed=%d", __func__, ret); | 786 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
776 | return ret; | 787 | return ret; |
777 | } | 788 | } |
778 | 789 | ||
@@ -829,7 +840,7 @@ static int tda10071_get_frontend(struct dvb_frontend *fe) | |||
829 | 840 | ||
830 | return ret; | 841 | return ret; |
831 | error: | 842 | error: |
832 | dbg("%s: failed=%d", __func__, ret); | 843 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
833 | return ret; | 844 | return ret; |
834 | } | 845 | } |
835 | 846 | ||
@@ -929,10 +940,11 @@ static int tda10071_init(struct dvb_frontend *fe) | |||
929 | /* request the firmware, this will block and timeout */ | 940 | /* request the firmware, this will block and timeout */ |
930 | ret = request_firmware(&fw, fw_file, priv->i2c->dev.parent); | 941 | ret = request_firmware(&fw, fw_file, priv->i2c->dev.parent); |
931 | if (ret) { | 942 | if (ret) { |
932 | err("did not find the firmware file. (%s) " | 943 | dev_err(&priv->i2c->dev, "%s: did not find the " \ |
933 | "Please see linux/Documentation/dvb/ for more" \ | 944 | "firmware file. (%s) Please see " \ |
934 | " details on firmware-problems. (%d)", | 945 | "linux/Documentation/dvb/ for more " \ |
935 | fw_file, ret); | 946 | "details on firmware-problems. (%d)\n", |
947 | KBUILD_MODNAME, fw_file, ret); | ||
936 | goto error; | 948 | goto error; |
937 | } | 949 | } |
938 | 950 | ||
@@ -961,10 +973,11 @@ static int tda10071_init(struct dvb_frontend *fe) | |||
961 | if (ret) | 973 | if (ret) |
962 | goto error_release_firmware; | 974 | goto error_release_firmware; |
963 | 975 | ||
964 | info("found a '%s' in cold state, will try to load a firmware", | 976 | dev_info(&priv->i2c->dev, "%s: found a '%s' in cold state, " \ |
965 | tda10071_ops.info.name); | 977 | "will try to load a firmware\n", KBUILD_MODNAME, |
966 | 978 | tda10071_ops.info.name); | |
967 | info("downloading firmware from file '%s'", fw_file); | 979 | dev_info(&priv->i2c->dev, "%s: downloading firmware from " \ |
980 | "file '%s'\n", KBUILD_MODNAME, fw_file); | ||
968 | 981 | ||
969 | /* do not download last byte */ | 982 | /* do not download last byte */ |
970 | fw_size = fw->size - 1; | 983 | fw_size = fw->size - 1; |
@@ -978,7 +991,9 @@ static int tda10071_init(struct dvb_frontend *fe) | |||
978 | ret = tda10071_wr_regs(priv, 0xfa, | 991 | ret = tda10071_wr_regs(priv, 0xfa, |
979 | (u8 *) &fw->data[fw_size - remaining], len); | 992 | (u8 *) &fw->data[fw_size - remaining], len); |
980 | if (ret) { | 993 | if (ret) { |
981 | err("firmware download failed=%d", ret); | 994 | dev_err(&priv->i2c->dev, "%s: firmware " \ |
995 | "download failed=%d\n", | ||
996 | KBUILD_MODNAME, ret); | ||
982 | if (ret) | 997 | if (ret) |
983 | goto error_release_firmware; | 998 | goto error_release_firmware; |
984 | } | 999 | } |
@@ -1002,7 +1017,8 @@ static int tda10071_init(struct dvb_frontend *fe) | |||
1002 | goto error; | 1017 | goto error; |
1003 | 1018 | ||
1004 | if (tmp) { | 1019 | if (tmp) { |
1005 | info("firmware did not run"); | 1020 | dev_info(&priv->i2c->dev, "%s: firmware did not run\n", |
1021 | KBUILD_MODNAME); | ||
1006 | ret = -EFAULT; | 1022 | ret = -EFAULT; |
1007 | goto error; | 1023 | goto error; |
1008 | } else { | 1024 | } else { |
@@ -1019,9 +1035,10 @@ static int tda10071_init(struct dvb_frontend *fe) | |||
1019 | if (ret) | 1035 | if (ret) |
1020 | goto error; | 1036 | goto error; |
1021 | 1037 | ||
1022 | info("firmware version %d.%d.%d.%d", | 1038 | dev_info(&priv->i2c->dev, "%s: firmware version %d.%d.%d.%d\n", |
1023 | buf[0], buf[1], buf[2], buf[3]); | 1039 | KBUILD_MODNAME, buf[0], buf[1], buf[2], buf[3]); |
1024 | info("found a '%s' in warm state.", tda10071_ops.info.name); | 1040 | dev_info(&priv->i2c->dev, "%s: found a '%s' in warm state\n", |
1041 | KBUILD_MODNAME, tda10071_ops.info.name); | ||
1025 | 1042 | ||
1026 | ret = tda10071_rd_regs(priv, 0x81, buf, 2); | 1043 | ret = tda10071_rd_regs(priv, 0x81, buf, 2); |
1027 | if (ret) | 1044 | if (ret) |
@@ -1105,7 +1122,7 @@ static int tda10071_init(struct dvb_frontend *fe) | |||
1105 | error_release_firmware: | 1122 | error_release_firmware: |
1106 | release_firmware(fw); | 1123 | release_firmware(fw); |
1107 | error: | 1124 | error: |
1108 | dbg("%s: failed=%d", __func__, ret); | 1125 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
1109 | return ret; | 1126 | return ret; |
1110 | } | 1127 | } |
1111 | 1128 | ||
@@ -1149,7 +1166,7 @@ static int tda10071_sleep(struct dvb_frontend *fe) | |||
1149 | 1166 | ||
1150 | return ret; | 1167 | return ret; |
1151 | error: | 1168 | error: |
1152 | dbg("%s: failed=%d", __func__, ret); | 1169 | dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); |
1153 | return ret; | 1170 | return ret; |
1154 | } | 1171 | } |
1155 | 1172 | ||
@@ -1208,7 +1225,7 @@ struct dvb_frontend *tda10071_attach(const struct tda10071_config *config, | |||
1208 | 1225 | ||
1209 | return &priv->fe; | 1226 | return &priv->fe; |
1210 | error: | 1227 | error: |
1211 | dbg("%s: failed=%d", __func__, ret); | 1228 | dev_dbg(&i2c->dev, "%s: failed=%d\n", __func__, ret); |
1212 | kfree(priv); | 1229 | kfree(priv); |
1213 | return NULL; | 1230 | return NULL; |
1214 | } | 1231 | } |