aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-02-08 06:34:43 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:42 -0400
commit68d5ce70217ddd20baf3583ce25f08e869eb148f (patch)
tree9c12af53f7291e96f8a58f3596fda922a5155783 /drivers/media/common/tuners
parent230b65f9945b468c23188572144b4f066af8f98c (diff)
V4L/DVB (10504): tda827x: Be sure that gate will be open/closed at the proper time
The gate control logic is broken: several routines just keep it open; other rotines close it properly; there are even other routines that assumes that it is open without really checking or opening it. Instead of having to manually handle the gate control and having such troubles, let a sub-routine take care of the gate, opening it before i2c_transfer and closing it after that. This avoids leaving the gate into a random state. Cc: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners')
-rw-r--r--drivers/media/common/tuners/tda827x.c183
1 files changed, 102 insertions, 81 deletions
diff --git a/drivers/media/common/tuners/tda827x.c b/drivers/media/common/tuners/tda827x.c
index f4d931f14fad..8cd55a83b381 100644
--- a/drivers/media/common/tuners/tda827x.c
+++ b/drivers/media/common/tuners/tda827x.c
@@ -132,11 +132,31 @@ static const struct tda827x_data tda827x_table[] = {
132 { .lomax = 0, .spd = 0, .bs = 0, .bp = 0, .cp = 0, .gc3 = 0, .div1p5 = 0} 132 { .lomax = 0, .spd = 0, .bs = 0, .bp = 0, .cp = 0, .gc3 = 0, .div1p5 = 0}
133}; 133};
134 134
135static int tuner_transfer(struct dvb_frontend *fe,
136 struct i2c_msg *msg,
137 const int size)
138{
139 int rc;
140 struct tda827x_priv *priv = fe->tuner_priv;
141
142 if (fe->ops.i2c_gate_ctrl)
143 fe->ops.i2c_gate_ctrl(fe, 1);
144 rc = i2c_transfer(priv->i2c_adap, msg, size);
145 if (fe->ops.i2c_gate_ctrl)
146 fe->ops.i2c_gate_ctrl(fe, 0);
147
148 if (rc >= 0 && rc != size)
149 return -EIO;
150
151 return rc;
152}
153
135static int tda827xo_set_params(struct dvb_frontend *fe, 154static int tda827xo_set_params(struct dvb_frontend *fe,
136 struct dvb_frontend_parameters *params) 155 struct dvb_frontend_parameters *params)
137{ 156{
138 struct tda827x_priv *priv = fe->tuner_priv; 157 struct tda827x_priv *priv = fe->tuner_priv;
139 u8 buf[14]; 158 u8 buf[14];
159 int rc;
140 160
141 struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0, 161 struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
142 .buf = buf, .len = sizeof(buf) }; 162 .buf = buf, .len = sizeof(buf) };
@@ -183,27 +203,29 @@ static int tda827xo_set_params(struct dvb_frontend *fe,
183 buf[13] = 0x40; 203 buf[13] = 0x40;
184 204
185 msg.len = 14; 205 msg.len = 14;
186 if (fe->ops.i2c_gate_ctrl) 206 rc = tuner_transfer(fe, &msg, 1);
187 fe->ops.i2c_gate_ctrl(fe, 1); 207 if (rc < 0)
188 if (i2c_transfer(priv->i2c_adap, &msg, 1) != 1) { 208 goto err;
189 printk("%s: could not write to tuner at addr: 0x%02x\n", 209
190 __func__, priv->i2c_addr << 1);
191 return -EIO;
192 }
193 msleep(500); 210 msleep(500);
194 /* correct CP value */ 211 /* correct CP value */
195 buf[0] = 0x30; 212 buf[0] = 0x30;
196 buf[1] = 0x50 + tda827x_table[i].cp; 213 buf[1] = 0x50 + tda827x_table[i].cp;
197 msg.len = 2; 214 msg.len = 2;
198 215
199 if (fe->ops.i2c_gate_ctrl) 216 rc = tuner_transfer(fe, &msg, 1);
200 fe->ops.i2c_gate_ctrl(fe, 1); 217 if (rc < 0)
201 i2c_transfer(priv->i2c_adap, &msg, 1); 218 goto err;
202 219
203 priv->frequency = params->frequency; 220 priv->frequency = params->frequency;
204 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0; 221 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0;
205 222
206 return 0; 223 return 0;
224
225err:
226 printk(KERN_ERR "%s: could not write to tuner at addr: 0x%02x\n",
227 __func__, priv->i2c_addr << 1);
228 return rc;
207} 229}
208 230
209static int tda827xo_sleep(struct dvb_frontend *fe) 231static int tda827xo_sleep(struct dvb_frontend *fe)
@@ -214,9 +236,7 @@ static int tda827xo_sleep(struct dvb_frontend *fe)
214 .buf = buf, .len = sizeof(buf) }; 236 .buf = buf, .len = sizeof(buf) };
215 237
216 dprintk("%s:\n", __func__); 238 dprintk("%s:\n", __func__);
217 if (fe->ops.i2c_gate_ctrl) 239 tuner_transfer(fe, &msg, 1);
218 fe->ops.i2c_gate_ctrl(fe, 1);
219 i2c_transfer(priv->i2c_adap, &msg, 1);
220 240
221 if (priv->cfg && priv->cfg->sleep) 241 if (priv->cfg && priv->cfg->sleep)
222 priv->cfg->sleep(fe); 242 priv->cfg->sleep(fe);
@@ -266,44 +286,44 @@ static int tda827xo_set_analog_params(struct dvb_frontend *fe,
266 286
267 msg.buf = tuner_reg; 287 msg.buf = tuner_reg;
268 msg.len = 8; 288 msg.len = 8;
269 i2c_transfer(priv->i2c_adap, &msg, 1); 289 tuner_transfer(fe, &msg, 1);
270 290
271 msg.buf = reg2; 291 msg.buf = reg2;
272 msg.len = 2; 292 msg.len = 2;
273 reg2[0] = 0x80; 293 reg2[0] = 0x80;
274 reg2[1] = 0; 294 reg2[1] = 0;
275 i2c_transfer(priv->i2c_adap, &msg, 1); 295 tuner_transfer(fe, &msg, 1);
276 296
277 reg2[0] = 0x60; 297 reg2[0] = 0x60;
278 reg2[1] = 0xbf; 298 reg2[1] = 0xbf;
279 i2c_transfer(priv->i2c_adap, &msg, 1); 299 tuner_transfer(fe, &msg, 1);
280 300
281 reg2[0] = 0x30; 301 reg2[0] = 0x30;
282 reg2[1] = tuner_reg[4] + 0x80; 302 reg2[1] = tuner_reg[4] + 0x80;
283 i2c_transfer(priv->i2c_adap, &msg, 1); 303 tuner_transfer(fe, &msg, 1);
284 304
285 msleep(1); 305 msleep(1);
286 reg2[0] = 0x30; 306 reg2[0] = 0x30;
287 reg2[1] = tuner_reg[4] + 4; 307 reg2[1] = tuner_reg[4] + 4;
288 i2c_transfer(priv->i2c_adap, &msg, 1); 308 tuner_transfer(fe, &msg, 1);
289 309
290 msleep(1); 310 msleep(1);
291 reg2[0] = 0x30; 311 reg2[0] = 0x30;
292 reg2[1] = tuner_reg[4]; 312 reg2[1] = tuner_reg[4];
293 i2c_transfer(priv->i2c_adap, &msg, 1); 313 tuner_transfer(fe, &msg, 1);
294 314
295 msleep(550); 315 msleep(550);
296 reg2[0] = 0x30; 316 reg2[0] = 0x30;
297 reg2[1] = (tuner_reg[4] & 0xfc) + tda827x_table[i].cp; 317 reg2[1] = (tuner_reg[4] & 0xfc) + tda827x_table[i].cp;
298 i2c_transfer(priv->i2c_adap, &msg, 1); 318 tuner_transfer(fe, &msg, 1);
299 319
300 reg2[0] = 0x60; 320 reg2[0] = 0x60;
301 reg2[1] = 0x3f; 321 reg2[1] = 0x3f;
302 i2c_transfer(priv->i2c_adap, &msg, 1); 322 tuner_transfer(fe, &msg, 1);
303 323
304 reg2[0] = 0x80; 324 reg2[0] = 0x80;
305 reg2[1] = 0x08; /* Vsync en */ 325 reg2[1] = 0x08; /* Vsync en */
306 i2c_transfer(priv->i2c_adap, &msg, 1); 326 tuner_transfer(fe, &msg, 1);
307 327
308 priv->frequency = params->frequency; 328 priv->frequency = params->frequency;
309 329
@@ -317,7 +337,7 @@ static void tda827xo_agcf(struct dvb_frontend *fe)
317 struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0, 337 struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
318 .buf = data, .len = 2}; 338 .buf = data, .len = 2};
319 339
320 i2c_transfer(priv->i2c_adap, &msg, 1); 340 tuner_transfer(fe, &msg, 1);
321} 341}
322 342
323/* ------------------------------------------------------------------ */ 343/* ------------------------------------------------------------------ */
@@ -398,13 +418,8 @@ static int tda827xa_sleep(struct dvb_frontend *fe)
398 .buf = buf, .len = sizeof(buf) }; 418 .buf = buf, .len = sizeof(buf) };
399 419
400 dprintk("%s:\n", __func__); 420 dprintk("%s:\n", __func__);
401 if (fe->ops.i2c_gate_ctrl)
402 fe->ops.i2c_gate_ctrl(fe, 1);
403 421
404 i2c_transfer(priv->i2c_adap, &msg, 1); 422 tuner_transfer(fe, &msg, 1);
405
406 if (fe->ops.i2c_gate_ctrl)
407 fe->ops.i2c_gate_ctrl(fe, 0);
408 423
409 if (priv->cfg && priv->cfg->sleep) 424 if (priv->cfg && priv->cfg->sleep)
410 priv->cfg->sleep(fe); 425 priv->cfg->sleep(fe);
@@ -455,7 +470,7 @@ static void tda827xa_lna_gain(struct dvb_frontend *fe, int high,
455 buf[1] = high ? 0 : 1; 470 buf[1] = high ? 0 : 1;
456 if (priv->cfg->config == 2) 471 if (priv->cfg->config == 2)
457 buf[1] = high ? 1 : 0; 472 buf[1] = high ? 1 : 0;
458 i2c_transfer(priv->i2c_adap, &msg, 1); 473 tuner_transfer(fe, &msg, 1);
459 break; 474 break;
460 case 3: /* switch with GPIO of saa713x */ 475 case 3: /* switch with GPIO of saa713x */
461 if (fe->callback) 476 if (fe->callback)
@@ -474,7 +489,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
474 struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0, 489 struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
475 .buf = buf, .len = sizeof(buf) }; 490 .buf = buf, .len = sizeof(buf) };
476 491
477 int i, tuner_freq, if_freq; 492 int i, tuner_freq, if_freq, rc;
478 u32 N; 493 u32 N;
479 494
480 dprintk("%s:\n", __func__); 495 dprintk("%s:\n", __func__);
@@ -516,35 +531,32 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
516 buf[9] = 0x24; 531 buf[9] = 0x24;
517 buf[10] = 0x00; 532 buf[10] = 0x00;
518 msg.len = 11; 533 msg.len = 11;
519 if (fe->ops.i2c_gate_ctrl) 534 rc = tuner_transfer(fe, &msg, 1);
520 fe->ops.i2c_gate_ctrl(fe, 1); 535 if (rc < 0)
521 if (i2c_transfer(priv->i2c_adap, &msg, 1) != 1) { 536 goto err;
522 printk("%s: could not write to tuner at addr: 0x%02x\n", 537
523 __func__, priv->i2c_addr << 1);
524 return -EIO;
525 }
526 buf[0] = 0x90; 538 buf[0] = 0x90;
527 buf[1] = 0xff; 539 buf[1] = 0xff;
528 buf[2] = 0x60; 540 buf[2] = 0x60;
529 buf[3] = 0x00; 541 buf[3] = 0x00;
530 buf[4] = 0x59; // lpsel, for 6MHz + 2 542 buf[4] = 0x59; // lpsel, for 6MHz + 2
531 msg.len = 5; 543 msg.len = 5;
532 if (fe->ops.i2c_gate_ctrl) 544 rc = tuner_transfer(fe, &msg, 1);
533 fe->ops.i2c_gate_ctrl(fe, 1); 545 if (rc < 0)
534 i2c_transfer(priv->i2c_adap, &msg, 1); 546 goto err;
535 547
536 buf[0] = 0xa0; 548 buf[0] = 0xa0;
537 buf[1] = 0x40; 549 buf[1] = 0x40;
538 msg.len = 2; 550 msg.len = 2;
539 if (fe->ops.i2c_gate_ctrl) 551 rc = tuner_transfer(fe, &msg, 1);
540 fe->ops.i2c_gate_ctrl(fe, 1); 552 if (rc < 0)
541 i2c_transfer(priv->i2c_adap, &msg, 1); 553 goto err;
542 554
543 msleep(11); 555 msleep(11);
544 msg.flags = I2C_M_RD; 556 msg.flags = I2C_M_RD;
545 if (fe->ops.i2c_gate_ctrl) 557 rc = tuner_transfer(fe, &msg, 1);
546 fe->ops.i2c_gate_ctrl(fe, 1); 558 if (rc < 0)
547 i2c_transfer(priv->i2c_adap, &msg, 1); 559 goto err;
548 msg.flags = 0; 560 msg.flags = 0;
549 561
550 buf[1] >>= 4; 562 buf[1] >>= 4;
@@ -553,49 +565,55 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
553 tda827xa_lna_gain(fe, 0, NULL); 565 tda827xa_lna_gain(fe, 0, NULL);
554 buf[0] = 0x60; 566 buf[0] = 0x60;
555 buf[1] = 0x0c; 567 buf[1] = 0x0c;
556 if (fe->ops.i2c_gate_ctrl) 568 rc = tuner_transfer(fe, &msg, 1);
557 fe->ops.i2c_gate_ctrl(fe, 1); 569 if (rc < 0)
558 i2c_transfer(priv->i2c_adap, &msg, 1); 570 goto err;
559 } 571 }
560 572
561 buf[0] = 0xc0; 573 buf[0] = 0xc0;
562 buf[1] = 0x99; // lpsel, for 6MHz + 2 574 buf[1] = 0x99; // lpsel, for 6MHz + 2
563 if (fe->ops.i2c_gate_ctrl) 575 rc = tuner_transfer(fe, &msg, 1);
564 fe->ops.i2c_gate_ctrl(fe, 1); 576 if (rc < 0)
565 i2c_transfer(priv->i2c_adap, &msg, 1); 577 goto err;
566 578
567 buf[0] = 0x60; 579 buf[0] = 0x60;
568 buf[1] = 0x3c; 580 buf[1] = 0x3c;
569 if (fe->ops.i2c_gate_ctrl) 581 rc = tuner_transfer(fe, &msg, 1);
570 fe->ops.i2c_gate_ctrl(fe, 1); 582 if (rc < 0)
571 i2c_transfer(priv->i2c_adap, &msg, 1); 583 goto err;
572 584
573 /* correct CP value */ 585 /* correct CP value */
574 buf[0] = 0x30; 586 buf[0] = 0x30;
575 buf[1] = 0x10 + tda827xa_dvbt[i].scr; 587 buf[1] = 0x10 + tda827xa_dvbt[i].scr;
576 if (fe->ops.i2c_gate_ctrl) 588 rc = tuner_transfer(fe, &msg, 1);
577 fe->ops.i2c_gate_ctrl(fe, 1); 589 if (rc < 0)
578 i2c_transfer(priv->i2c_adap, &msg, 1); 590 goto err;
579 591
580 msleep(163); 592 msleep(163);
581 buf[0] = 0xc0; 593 buf[0] = 0xc0;
582 buf[1] = 0x39; // lpsel, for 6MHz + 2 594 buf[1] = 0x39; // lpsel, for 6MHz + 2
583 if (fe->ops.i2c_gate_ctrl) 595 rc = tuner_transfer(fe, &msg, 1);
584 fe->ops.i2c_gate_ctrl(fe, 1); 596 if (rc < 0)
585 i2c_transfer(priv->i2c_adap, &msg, 1); 597 goto err;
586 598
587 msleep(3); 599 msleep(3);
588 /* freeze AGC1 */ 600 /* freeze AGC1 */
589 buf[0] = 0x50; 601 buf[0] = 0x50;
590 buf[1] = 0x4f + (tda827xa_dvbt[i].gc3 << 4); 602 buf[1] = 0x4f + (tda827xa_dvbt[i].gc3 << 4);
591 if (fe->ops.i2c_gate_ctrl) 603 rc = tuner_transfer(fe, &msg, 1);
592 fe->ops.i2c_gate_ctrl(fe, 1); 604 if (rc < 0)
593 i2c_transfer(priv->i2c_adap, &msg, 1); 605 goto err;
594 606
595 priv->frequency = params->frequency; 607 priv->frequency = params->frequency;
596 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0; 608 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0;
597 609
610
598 return 0; 611 return 0;
612
613err:
614 printk(KERN_ERR "%s: could not write to tuner at addr: 0x%02x\n",
615 __func__, priv->i2c_addr << 1);
616 return rc;
599} 617}
600 618
601 619
@@ -643,7 +661,7 @@ static int tda827xa_set_analog_params(struct dvb_frontend *fe,
643 tuner_reg[9] = 0x20; 661 tuner_reg[9] = 0x20;
644 tuner_reg[10] = 0x00; 662 tuner_reg[10] = 0x00;
645 msg.len = 11; 663 msg.len = 11;
646 i2c_transfer(priv->i2c_adap, &msg, 1); 664 tuner_transfer(fe, &msg, 1);
647 665
648 tuner_reg[0] = 0x90; 666 tuner_reg[0] = 0x90;
649 tuner_reg[1] = 0xff; 667 tuner_reg[1] = 0xff;
@@ -651,19 +669,19 @@ static int tda827xa_set_analog_params(struct dvb_frontend *fe,
651 tuner_reg[3] = 0; 669 tuner_reg[3] = 0;
652 tuner_reg[4] = 0x99 + (priv->lpsel << 1); 670 tuner_reg[4] = 0x99 + (priv->lpsel << 1);
653 msg.len = 5; 671 msg.len = 5;
654 i2c_transfer(priv->i2c_adap, &msg, 1); 672 tuner_transfer(fe, &msg, 1);
655 673
656 tuner_reg[0] = 0xa0; 674 tuner_reg[0] = 0xa0;
657 tuner_reg[1] = 0xc0; 675 tuner_reg[1] = 0xc0;
658 msg.len = 2; 676 msg.len = 2;
659 i2c_transfer(priv->i2c_adap, &msg, 1); 677 tuner_transfer(fe, &msg, 1);
660 678
661 tuner_reg[0] = 0x30; 679 tuner_reg[0] = 0x30;
662 tuner_reg[1] = 0x10 + tda827xa_analog[i].scr; 680 tuner_reg[1] = 0x10 + tda827xa_analog[i].scr;
663 i2c_transfer(priv->i2c_adap, &msg, 1); 681 tuner_transfer(fe, &msg, 1);
664 682
665 msg.flags = I2C_M_RD; 683 msg.flags = I2C_M_RD;
666 i2c_transfer(priv->i2c_adap, &msg, 1); 684 tuner_transfer(fe, &msg, 1);
667 msg.flags = 0; 685 msg.flags = 0;
668 tuner_reg[1] >>= 4; 686 tuner_reg[1] >>= 4;
669 dprintk("AGC2 gain is: %d\n", tuner_reg[1]); 687 dprintk("AGC2 gain is: %d\n", tuner_reg[1]);
@@ -673,24 +691,24 @@ static int tda827xa_set_analog_params(struct dvb_frontend *fe,
673 msleep(100); 691 msleep(100);
674 tuner_reg[0] = 0x60; 692 tuner_reg[0] = 0x60;
675 tuner_reg[1] = 0x3c; 693 tuner_reg[1] = 0x3c;
676 i2c_transfer(priv->i2c_adap, &msg, 1); 694 tuner_transfer(fe, &msg, 1);
677 695
678 msleep(163); 696 msleep(163);
679 tuner_reg[0] = 0x50; 697 tuner_reg[0] = 0x50;
680 tuner_reg[1] = 0x8f + (tda827xa_analog[i].gc3 << 4); 698 tuner_reg[1] = 0x8f + (tda827xa_analog[i].gc3 << 4);
681 i2c_transfer(priv->i2c_adap, &msg, 1); 699 tuner_transfer(fe, &msg, 1);
682 700
683 tuner_reg[0] = 0x80; 701 tuner_reg[0] = 0x80;
684 tuner_reg[1] = 0x28; 702 tuner_reg[1] = 0x28;
685 i2c_transfer(priv->i2c_adap, &msg, 1); 703 tuner_transfer(fe, &msg, 1);
686 704
687 tuner_reg[0] = 0xb0; 705 tuner_reg[0] = 0xb0;
688 tuner_reg[1] = 0x01; 706 tuner_reg[1] = 0x01;
689 i2c_transfer(priv->i2c_adap, &msg, 1); 707 tuner_transfer(fe, &msg, 1);
690 708
691 tuner_reg[0] = 0xc0; 709 tuner_reg[0] = 0xc0;
692 tuner_reg[1] = 0x19 + (priv->lpsel << 1); 710 tuner_reg[1] = 0x19 + (priv->lpsel << 1);
693 i2c_transfer(priv->i2c_adap, &msg, 1); 711 tuner_transfer(fe, &msg, 1);
694 712
695 priv->frequency = params->frequency; 713 priv->frequency = params->frequency;
696 714
@@ -703,7 +721,7 @@ static void tda827xa_agcf(struct dvb_frontend *fe)
703 unsigned char data[] = {0x80, 0x2c}; 721 unsigned char data[] = {0x80, 0x2c};
704 struct i2c_msg msg = {.addr = priv->i2c_addr, .flags = 0, 722 struct i2c_msg msg = {.addr = priv->i2c_addr, .flags = 0,
705 .buf = data, .len = 2}; 723 .buf = data, .len = 2};
706 i2c_transfer(priv->i2c_adap, &msg, 1); 724 tuner_transfer(fe, &msg, 1);
707} 725}
708 726
709/* ------------------------------------------------------------------ */ 727/* ------------------------------------------------------------------ */
@@ -792,16 +810,19 @@ static struct dvb_tuner_ops tda827xa_tuner_ops = {
792}; 810};
793 811
794static int tda827x_probe_version(struct dvb_frontend *fe) 812static int tda827x_probe_version(struct dvb_frontend *fe)
795{ u8 data; 813{
814 u8 data;
815 int rc;
796 struct tda827x_priv *priv = fe->tuner_priv; 816 struct tda827x_priv *priv = fe->tuner_priv;
797 struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = I2C_M_RD, 817 struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = I2C_M_RD,
798 .buf = &data, .len = 1 }; 818 .buf = &data, .len = 1 };
799 if (fe->ops.i2c_gate_ctrl) 819
800 fe->ops.i2c_gate_ctrl(fe, 1); 820 rc = tuner_transfer(fe, &msg, 1);
801 if (i2c_transfer(priv->i2c_adap, &msg, 1) != 1) { 821
822 if (rc < 0) {
802 printk("%s: could not read from tuner at addr: 0x%02x\n", 823 printk("%s: could not read from tuner at addr: 0x%02x\n",
803 __func__, msg.addr << 1); 824 __func__, msg.addr << 1);
804 return -EIO; 825 return rc;
805 } 826 }
806 if ((data & 0x3c) == 0) { 827 if ((data & 0x3c) == 0) {
807 dprintk("tda827x tuner found\n"); 828 dprintk("tda827x tuner found\n");