diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-25 13:10:11 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:04:25 -0500 |
commit | 182519f4c99f73f376323580dda494d986b4760b (patch) | |
tree | 1104af036e85295101407e0b309cae1f36bd663b /drivers/media/dvb/frontends/tda18271-fe.c | |
parent | 2f27dfc98cc0a183be9e3c2fc0da0450b85e5fde (diff) |
V4L/DVB (6927): tda18271: improve printk macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/tda18271-fe.c')
-rw-r--r-- | drivers/media/dvb/frontends/tda18271-fe.c | 58 |
1 files changed, 27 insertions, 31 deletions
diff --git a/drivers/media/dvb/frontends/tda18271-fe.c b/drivers/media/dvb/frontends/tda18271-fe.c index 72e256ebeb0..8146c4e7ee7 100644 --- a/drivers/media/dvb/frontends/tda18271-fe.c +++ b/drivers/media/dvb/frontends/tda18271-fe.c | |||
@@ -76,23 +76,23 @@ static void tda18271_dump_regs(struct dvb_frontend *fe) | |||
76 | struct tda18271_priv *priv = fe->tuner_priv; | 76 | struct tda18271_priv *priv = fe->tuner_priv; |
77 | unsigned char *regs = priv->tda18271_regs; | 77 | unsigned char *regs = priv->tda18271_regs; |
78 | 78 | ||
79 | dbg_reg("=== TDA18271 REG DUMP ===\n"); | 79 | tda_reg("=== TDA18271 REG DUMP ===\n"); |
80 | dbg_reg("ID_BYTE = 0x%02x\n", 0xff & regs[R_ID]); | 80 | tda_reg("ID_BYTE = 0x%02x\n", 0xff & regs[R_ID]); |
81 | dbg_reg("THERMO_BYTE = 0x%02x\n", 0xff & regs[R_TM]); | 81 | tda_reg("THERMO_BYTE = 0x%02x\n", 0xff & regs[R_TM]); |
82 | dbg_reg("POWER_LEVEL_BYTE = 0x%02x\n", 0xff & regs[R_PL]); | 82 | tda_reg("POWER_LEVEL_BYTE = 0x%02x\n", 0xff & regs[R_PL]); |
83 | dbg_reg("EASY_PROG_BYTE_1 = 0x%02x\n", 0xff & regs[R_EP1]); | 83 | tda_reg("EASY_PROG_BYTE_1 = 0x%02x\n", 0xff & regs[R_EP1]); |
84 | dbg_reg("EASY_PROG_BYTE_2 = 0x%02x\n", 0xff & regs[R_EP2]); | 84 | tda_reg("EASY_PROG_BYTE_2 = 0x%02x\n", 0xff & regs[R_EP2]); |
85 | dbg_reg("EASY_PROG_BYTE_3 = 0x%02x\n", 0xff & regs[R_EP3]); | 85 | tda_reg("EASY_PROG_BYTE_3 = 0x%02x\n", 0xff & regs[R_EP3]); |
86 | dbg_reg("EASY_PROG_BYTE_4 = 0x%02x\n", 0xff & regs[R_EP4]); | 86 | tda_reg("EASY_PROG_BYTE_4 = 0x%02x\n", 0xff & regs[R_EP4]); |
87 | dbg_reg("EASY_PROG_BYTE_5 = 0x%02x\n", 0xff & regs[R_EP5]); | 87 | tda_reg("EASY_PROG_BYTE_5 = 0x%02x\n", 0xff & regs[R_EP5]); |
88 | dbg_reg("CAL_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_CPD]); | 88 | tda_reg("CAL_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_CPD]); |
89 | dbg_reg("CAL_DIV_BYTE_1 = 0x%02x\n", 0xff & regs[R_CD1]); | 89 | tda_reg("CAL_DIV_BYTE_1 = 0x%02x\n", 0xff & regs[R_CD1]); |
90 | dbg_reg("CAL_DIV_BYTE_2 = 0x%02x\n", 0xff & regs[R_CD2]); | 90 | tda_reg("CAL_DIV_BYTE_2 = 0x%02x\n", 0xff & regs[R_CD2]); |
91 | dbg_reg("CAL_DIV_BYTE_3 = 0x%02x\n", 0xff & regs[R_CD3]); | 91 | tda_reg("CAL_DIV_BYTE_3 = 0x%02x\n", 0xff & regs[R_CD3]); |
92 | dbg_reg("MAIN_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_MPD]); | 92 | tda_reg("MAIN_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_MPD]); |
93 | dbg_reg("MAIN_DIV_BYTE_1 = 0x%02x\n", 0xff & regs[R_MD1]); | 93 | tda_reg("MAIN_DIV_BYTE_1 = 0x%02x\n", 0xff & regs[R_MD1]); |
94 | dbg_reg("MAIN_DIV_BYTE_2 = 0x%02x\n", 0xff & regs[R_MD2]); | 94 | tda_reg("MAIN_DIV_BYTE_2 = 0x%02x\n", 0xff & regs[R_MD2]); |
95 | dbg_reg("MAIN_DIV_BYTE_3 = 0x%02x\n", 0xff & regs[R_MD3]); | 95 | tda_reg("MAIN_DIV_BYTE_3 = 0x%02x\n", 0xff & regs[R_MD3]); |
96 | } | 96 | } |
97 | 97 | ||
98 | static void tda18271_read_regs(struct dvb_frontend *fe) | 98 | static void tda18271_read_regs(struct dvb_frontend *fe) |
@@ -116,8 +116,7 @@ static void tda18271_read_regs(struct dvb_frontend *fe) | |||
116 | tda18271_i2c_gate_ctrl(fe, 0); | 116 | tda18271_i2c_gate_ctrl(fe, 0); |
117 | 117 | ||
118 | if (ret != 2) | 118 | if (ret != 2) |
119 | printk("ERROR: %s: i2c_transfer returned: %d\n", | 119 | tda_err("ERROR: i2c_transfer returned: %d\n", ret); |
120 | __FUNCTION__, ret); | ||
121 | 120 | ||
122 | if (tda18271_debug & DBG_REG) | 121 | if (tda18271_debug & DBG_REG) |
123 | tda18271_dump_regs(fe); | 122 | tda18271_dump_regs(fe); |
@@ -147,8 +146,7 @@ static void tda18271_write_regs(struct dvb_frontend *fe, int idx, int len) | |||
147 | tda18271_i2c_gate_ctrl(fe, 0); | 146 | tda18271_i2c_gate_ctrl(fe, 0); |
148 | 147 | ||
149 | if (ret != 1) | 148 | if (ret != 1) |
150 | printk(KERN_WARNING "ERROR: %s: i2c_transfer returned: %d\n", | 149 | tda_err("ERROR: i2c_transfer returned: %d\n", ret); |
151 | __FUNCTION__, ret); | ||
152 | } | 150 | } |
153 | 151 | ||
154 | /*---------------------------------------------------------------------*/ | 152 | /*---------------------------------------------------------------------*/ |
@@ -158,7 +156,8 @@ static int tda18271_init_regs(struct dvb_frontend *fe) | |||
158 | struct tda18271_priv *priv = fe->tuner_priv; | 156 | struct tda18271_priv *priv = fe->tuner_priv; |
159 | unsigned char *regs = priv->tda18271_regs; | 157 | unsigned char *regs = priv->tda18271_regs; |
160 | 158 | ||
161 | printk(KERN_INFO "tda18271: initializing registers\n"); | 159 | tda_dbg("initializing registers for device @ %d-%04x\n", |
160 | i2c_adapter_id(priv->i2c_adap), priv->i2c_addr); | ||
162 | 161 | ||
163 | /* initialize registers */ | 162 | /* initialize registers */ |
164 | regs[R_ID] = 0x83; | 163 | regs[R_ID] = 0x83; |
@@ -417,7 +416,7 @@ static int tda18271_tune(struct dvb_frontend *fe, | |||
417 | 416 | ||
418 | tda18271_init(fe); | 417 | tda18271_init(fe); |
419 | 418 | ||
420 | dbg_info("freq = %d, ifc = %d\n", freq, ifc); | 419 | tda_dbg("freq = %d, ifc = %d\n", freq, ifc); |
421 | 420 | ||
422 | /* RF tracking filter calibration */ | 421 | /* RF tracking filter calibration */ |
423 | 422 | ||
@@ -602,8 +601,7 @@ static int tda18271_set_params(struct dvb_frontend *fe, | |||
602 | sgIF = 4000000; | 601 | sgIF = 4000000; |
603 | break; | 602 | break; |
604 | default: | 603 | default: |
605 | printk(KERN_WARNING "%s: modulation not set!\n", | 604 | tda_warn("modulation not set!\n"); |
606 | __FUNCTION__); | ||
607 | return -EINVAL; | 605 | return -EINVAL; |
608 | } | 606 | } |
609 | #if 0 | 607 | #if 0 |
@@ -629,13 +627,11 @@ static int tda18271_set_params(struct dvb_frontend *fe, | |||
629 | sgIF = 4300000; | 627 | sgIF = 4300000; |
630 | break; | 628 | break; |
631 | default: | 629 | default: |
632 | printk(KERN_WARNING "%s: bandwidth not set!\n", | 630 | tda_warn("bandwidth not set!\n"); |
633 | __FUNCTION__); | ||
634 | return -EINVAL; | 631 | return -EINVAL; |
635 | } | 632 | } |
636 | } else { | 633 | } else { |
637 | printk(KERN_WARNING "%s: modulation type not supported!\n", | 634 | tda_warn("modulation type not supported!\n"); |
638 | __FUNCTION__); | ||
639 | return -EINVAL; | 635 | return -EINVAL; |
640 | } | 636 | } |
641 | 637 | ||
@@ -690,7 +686,7 @@ static int tda18271_set_analog_params(struct dvb_frontend *fe, | |||
690 | if (params->mode == V4L2_TUNER_RADIO) | 686 | if (params->mode == V4L2_TUNER_RADIO) |
691 | sgIF = 88; /* if frequency is 5.5 MHz */ | 687 | sgIF = 88; /* if frequency is 5.5 MHz */ |
692 | 688 | ||
693 | dbg_info("setting tda18271 to system %s\n", mode); | 689 | tda_dbg("setting tda18271 to system %s\n", mode); |
694 | 690 | ||
695 | return tda18271_tune(fe, sgIF * 62500, params->frequency * 62500, | 691 | return tda18271_tune(fe, sgIF * 62500, params->frequency * 62500, |
696 | 0, std); | 692 | 0, std); |
@@ -740,7 +736,7 @@ static int tda18271_get_id(struct dvb_frontend *fe) | |||
740 | break; | 736 | break; |
741 | } | 737 | } |
742 | 738 | ||
743 | dbg_info("%s detected @ %d-%04x%s\n", name, | 739 | tda_info("%s detected @ %d-%04x%s\n", name, |
744 | i2c_adapter_id(priv->i2c_adap), priv->i2c_addr, | 740 | i2c_adapter_id(priv->i2c_adap), priv->i2c_addr, |
745 | (0 == ret) ? "" : ", device not supported."); | 741 | (0 == ret) ? "" : ", device not supported."); |
746 | 742 | ||