diff options
author | Joe Perches <joe@perches.com> | 2011-07-31 03:30:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-08-27 10:20:45 -0400 |
commit | 2b50763a0b082e1fc40cca2a9b8936abf6e2437e (patch) | |
tree | 59d3782b54db5ecf9d3168502232e48dc4f7bc63 /drivers/media/common/tuners/tda18212.c | |
parent | be85fefecb20b533a2c3f668a345f03f492aeea3 (diff) |
[media] tda18212: Use standard logging, remove tda18212_priv.h
Use the more current logging styles with pr_fmt.
Remove now unnecessary private include.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/tda18212.c')
-rw-r--r-- | drivers/media/common/tuners/tda18212.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/drivers/media/common/tuners/tda18212.c b/drivers/media/common/tuners/tda18212.c index 1f1db20d46b1..e29cc2bc113a 100644 --- a/drivers/media/common/tuners/tda18212.c +++ b/drivers/media/common/tuners/tda18212.c | |||
@@ -18,7 +18,20 @@ | |||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include "tda18212_priv.h" | 21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
22 | |||
23 | #include "tda18212.h" | ||
24 | |||
25 | struct tda18212_priv { | ||
26 | struct tda18212_config *cfg; | ||
27 | struct i2c_adapter *i2c; | ||
28 | }; | ||
29 | |||
30 | #define dbg(fmt, arg...) \ | ||
31 | do { \ | ||
32 | if (debug) \ | ||
33 | pr_info("%s: " fmt, __func__, ##arg); \ | ||
34 | } while (0) | ||
22 | 35 | ||
23 | static int debug; | 36 | static int debug; |
24 | module_param(debug, int, 0644); | 37 | module_param(debug, int, 0644); |
@@ -46,7 +59,8 @@ static int tda18212_wr_regs(struct tda18212_priv *priv, u8 reg, u8 *val, | |||
46 | if (ret == 1) { | 59 | if (ret == 1) { |
47 | ret = 0; | 60 | ret = 0; |
48 | } else { | 61 | } else { |
49 | warn("i2c wr failed ret:%d reg:%02x len:%d", ret, reg, len); | 62 | pr_warn("i2c wr failed ret:%d reg:%02x len:%d\n", |
63 | ret, reg, len); | ||
50 | ret = -EREMOTEIO; | 64 | ret = -EREMOTEIO; |
51 | } | 65 | } |
52 | return ret; | 66 | return ret; |
@@ -77,7 +91,8 @@ static int tda18212_rd_regs(struct tda18212_priv *priv, u8 reg, u8 *val, | |||
77 | memcpy(val, buf, len); | 91 | memcpy(val, buf, len); |
78 | ret = 0; | 92 | ret = 0; |
79 | } else { | 93 | } else { |
80 | warn("i2c rd failed ret:%d reg:%02x len:%d", ret, reg, len); | 94 | pr_warn("i2c rd failed ret:%d reg:%02x len:%d\n", |
95 | ret, reg, len); | ||
81 | ret = -EREMOTEIO; | 96 | ret = -EREMOTEIO; |
82 | } | 97 | } |
83 | 98 | ||
@@ -129,8 +144,8 @@ static int tda18212_set_params(struct dvb_frontend *fe, | |||
129 | { 0x92, 0x53, 0x03 }, /* DVB-C */ | 144 | { 0x92, 0x53, 0x03 }, /* DVB-C */ |
130 | }; | 145 | }; |
131 | 146 | ||
132 | dbg("%s: delsys=%d RF=%d BW=%d", __func__, | 147 | dbg("delsys=%d RF=%d BW=%d\n", |
133 | c->delivery_system, c->frequency, c->bandwidth_hz); | 148 | c->delivery_system, c->frequency, c->bandwidth_hz); |
134 | 149 | ||
135 | if (fe->ops.i2c_gate_ctrl) | 150 | if (fe->ops.i2c_gate_ctrl) |
136 | fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ | 151 | fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ |
@@ -196,7 +211,7 @@ exit: | |||
196 | return ret; | 211 | return ret; |
197 | 212 | ||
198 | error: | 213 | error: |
199 | dbg("%s: failed:%d", __func__, ret); | 214 | dbg("failed:%d\n", ret); |
200 | goto exit; | 215 | goto exit; |
201 | } | 216 | } |
202 | 217 | ||
@@ -245,13 +260,13 @@ struct dvb_frontend *tda18212_attach(struct dvb_frontend *fe, | |||
245 | if (fe->ops.i2c_gate_ctrl) | 260 | if (fe->ops.i2c_gate_ctrl) |
246 | fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ | 261 | fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ |
247 | 262 | ||
248 | dbg("%s: ret:%d chip ID:%02x", __func__, ret, val); | 263 | dbg("ret:%d chip ID:%02x\n", ret, val); |
249 | if (ret || val != 0xc7) { | 264 | if (ret || val != 0xc7) { |
250 | kfree(priv); | 265 | kfree(priv); |
251 | return NULL; | 266 | return NULL; |
252 | } | 267 | } |
253 | 268 | ||
254 | info("NXP TDA18212HN successfully identified."); | 269 | pr_info("NXP TDA18212HN successfully identified\n"); |
255 | 270 | ||
256 | memcpy(&fe->ops.tuner_ops, &tda18212_tuner_ops, | 271 | memcpy(&fe->ops.tuner_ops, &tda18212_tuner_ops, |
257 | sizeof(struct dvb_tuner_ops)); | 272 | sizeof(struct dvb_tuner_ops)); |