diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-05-04 20:32:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-05-14 01:54:06 -0400 |
commit | 4bd5d1071ddbb35ae545c7738e6411e50ce28b17 (patch) | |
tree | 44ea03fd76a2aa8838b005c349f0838c11820b1c /drivers/media/common/tuners/tda18271-common.c | |
parent | 10ed0bf4af00c25590e8bfca344d8dec5c3637ae (diff) |
V4L/DVB (7844): tda18271: add tda_fail macro to log error cases
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/common/tuners/tda18271-common.c')
-rw-r--r-- | drivers/media/common/tuners/tda18271-common.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/common/tuners/tda18271-common.c b/drivers/media/common/tuners/tda18271-common.c index d6938fc2c4c6..42b5f5d4bfe6 100644 --- a/drivers/media/common/tuners/tda18271-common.c +++ b/drivers/media/common/tuners/tda18271-common.c | |||
@@ -508,7 +508,7 @@ int tda18271_calc_main_pll(struct dvb_frontend *fe, u32 freq) | |||
508 | u32 div; | 508 | u32 div; |
509 | 509 | ||
510 | int ret = tda18271_lookup_pll_map(fe, MAIN_PLL, &freq, &pd, &d); | 510 | int ret = tda18271_lookup_pll_map(fe, MAIN_PLL, &freq, &pd, &d); |
511 | if (ret < 0) | 511 | if (tda_fail(ret)) |
512 | goto fail; | 512 | goto fail; |
513 | 513 | ||
514 | regs[R_MPD] = (0x77 & pd); | 514 | regs[R_MPD] = (0x77 & pd); |
@@ -540,7 +540,7 @@ int tda18271_calc_cal_pll(struct dvb_frontend *fe, u32 freq) | |||
540 | u32 div; | 540 | u32 div; |
541 | 541 | ||
542 | int ret = tda18271_lookup_pll_map(fe, CAL_PLL, &freq, &pd, &d); | 542 | int ret = tda18271_lookup_pll_map(fe, CAL_PLL, &freq, &pd, &d); |
543 | if (ret < 0) | 543 | if (tda_fail(ret)) |
544 | goto fail; | 544 | goto fail; |
545 | 545 | ||
546 | regs[R_CPD] = pd; | 546 | regs[R_CPD] = pd; |
@@ -564,7 +564,7 @@ int tda18271_calc_bp_filter(struct dvb_frontend *fe, u32 *freq) | |||
564 | u8 val; | 564 | u8 val; |
565 | 565 | ||
566 | int ret = tda18271_lookup_map(fe, BP_FILTER, freq, &val); | 566 | int ret = tda18271_lookup_map(fe, BP_FILTER, freq, &val); |
567 | if (ret < 0) | 567 | if (tda_fail(ret)) |
568 | goto fail; | 568 | goto fail; |
569 | 569 | ||
570 | regs[R_EP1] &= ~0x07; /* clear bp filter bits */ | 570 | regs[R_EP1] &= ~0x07; /* clear bp filter bits */ |
@@ -581,7 +581,7 @@ int tda18271_calc_km(struct dvb_frontend *fe, u32 *freq) | |||
581 | u8 val; | 581 | u8 val; |
582 | 582 | ||
583 | int ret = tda18271_lookup_map(fe, RF_CAL_KMCO, freq, &val); | 583 | int ret = tda18271_lookup_map(fe, RF_CAL_KMCO, freq, &val); |
584 | if (ret < 0) | 584 | if (tda_fail(ret)) |
585 | goto fail; | 585 | goto fail; |
586 | 586 | ||
587 | regs[R_EB13] &= ~0x7c; /* clear k & m bits */ | 587 | regs[R_EB13] &= ~0x7c; /* clear k & m bits */ |
@@ -598,7 +598,7 @@ int tda18271_calc_rf_band(struct dvb_frontend *fe, u32 *freq) | |||
598 | u8 val; | 598 | u8 val; |
599 | 599 | ||
600 | int ret = tda18271_lookup_map(fe, RF_BAND, freq, &val); | 600 | int ret = tda18271_lookup_map(fe, RF_BAND, freq, &val); |
601 | if (ret < 0) | 601 | if (tda_fail(ret)) |
602 | goto fail; | 602 | goto fail; |
603 | 603 | ||
604 | regs[R_EP2] &= ~0xe0; /* clear rf band bits */ | 604 | regs[R_EP2] &= ~0xe0; /* clear rf band bits */ |
@@ -615,7 +615,7 @@ int tda18271_calc_gain_taper(struct dvb_frontend *fe, u32 *freq) | |||
615 | u8 val; | 615 | u8 val; |
616 | 616 | ||
617 | int ret = tda18271_lookup_map(fe, GAIN_TAPER, freq, &val); | 617 | int ret = tda18271_lookup_map(fe, GAIN_TAPER, freq, &val); |
618 | if (ret < 0) | 618 | if (tda_fail(ret)) |
619 | goto fail; | 619 | goto fail; |
620 | 620 | ||
621 | regs[R_EP2] &= ~0x1f; /* clear gain taper bits */ | 621 | regs[R_EP2] &= ~0x1f; /* clear gain taper bits */ |
@@ -632,7 +632,7 @@ int tda18271_calc_ir_measure(struct dvb_frontend *fe, u32 *freq) | |||
632 | u8 val; | 632 | u8 val; |
633 | 633 | ||
634 | int ret = tda18271_lookup_map(fe, IR_MEASURE, freq, &val); | 634 | int ret = tda18271_lookup_map(fe, IR_MEASURE, freq, &val); |
635 | if (ret < 0) | 635 | if (tda_fail(ret)) |
636 | goto fail; | 636 | goto fail; |
637 | 637 | ||
638 | regs[R_EP5] &= ~0x07; | 638 | regs[R_EP5] &= ~0x07; |