diff options
author | Antti Palosaari <crope@iki.fi> | 2014-08-24 22:35:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-21 15:42:35 -0400 |
commit | 13bd82d18ec29c7c81f2d42816f5a14095977c9e (patch) | |
tree | 80ba3d145074488036c2bdd8c29570dbb9d7365d /drivers/media/tuners | |
parent | b63ab6b064f73721568a46080d41422ea223ee6e (diff) |
[media] e4000: logging changes
Remove function name from debug logs. Logging system could add it
automatically.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r-- | drivers/media/tuners/e4000.c | 71 |
1 files changed, 32 insertions, 39 deletions
diff --git a/drivers/media/tuners/e4000.c b/drivers/media/tuners/e4000.c index cd9cf643f602..510239f80c0d 100644 --- a/drivers/media/tuners/e4000.c +++ b/drivers/media/tuners/e4000.c | |||
@@ -26,7 +26,7 @@ static int e4000_init(struct dvb_frontend *fe) | |||
26 | struct e4000 *s = fe->tuner_priv; | 26 | struct e4000 *s = fe->tuner_priv; |
27 | int ret; | 27 | int ret; |
28 | 28 | ||
29 | dev_dbg(&s->client->dev, "%s:\n", __func__); | 29 | dev_dbg(&s->client->dev, "\n"); |
30 | 30 | ||
31 | /* dummy I2C to ensure I2C wakes up */ | 31 | /* dummy I2C to ensure I2C wakes up */ |
32 | ret = regmap_write(s->regmap, 0x02, 0x40); | 32 | ret = regmap_write(s->regmap, 0x02, 0x40); |
@@ -87,7 +87,7 @@ static int e4000_init(struct dvb_frontend *fe) | |||
87 | s->active = true; | 87 | s->active = true; |
88 | err: | 88 | err: |
89 | if (ret) | 89 | if (ret) |
90 | dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); | 90 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
91 | 91 | ||
92 | return ret; | 92 | return ret; |
93 | } | 93 | } |
@@ -97,7 +97,7 @@ static int e4000_sleep(struct dvb_frontend *fe) | |||
97 | struct e4000 *s = fe->tuner_priv; | 97 | struct e4000 *s = fe->tuner_priv; |
98 | int ret; | 98 | int ret; |
99 | 99 | ||
100 | dev_dbg(&s->client->dev, "%s:\n", __func__); | 100 | dev_dbg(&s->client->dev, "\n"); |
101 | 101 | ||
102 | s->active = false; | 102 | s->active = false; |
103 | 103 | ||
@@ -106,7 +106,7 @@ static int e4000_sleep(struct dvb_frontend *fe) | |||
106 | goto err; | 106 | goto err; |
107 | err: | 107 | err: |
108 | if (ret) | 108 | if (ret) |
109 | dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); | 109 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
110 | 110 | ||
111 | return ret; | 111 | return ret; |
112 | } | 112 | } |
@@ -121,9 +121,8 @@ static int e4000_set_params(struct dvb_frontend *fe) | |||
121 | u8 buf[5], i_data[4], q_data[4]; | 121 | u8 buf[5], i_data[4], q_data[4]; |
122 | 122 | ||
123 | dev_dbg(&s->client->dev, | 123 | dev_dbg(&s->client->dev, |
124 | "%s: delivery_system=%d frequency=%u bandwidth_hz=%u\n", | 124 | "delivery_system=%d frequency=%u bandwidth_hz=%u\n", |
125 | __func__, c->delivery_system, c->frequency, | 125 | c->delivery_system, c->frequency, c->bandwidth_hz); |
126 | c->bandwidth_hz); | ||
127 | 126 | ||
128 | /* gain control manual */ | 127 | /* gain control manual */ |
129 | ret = regmap_write(s->regmap, 0x1a, 0x00); | 128 | ret = regmap_write(s->regmap, 0x1a, 0x00); |
@@ -150,9 +149,8 @@ static int e4000_set_params(struct dvb_frontend *fe) | |||
150 | buf[3] = 0x00; | 149 | buf[3] = 0x00; |
151 | buf[4] = e4000_pll_lut[i].div; | 150 | buf[4] = e4000_pll_lut[i].div; |
152 | 151 | ||
153 | dev_dbg(&s->client->dev, | 152 | dev_dbg(&s->client->dev, "f_vco=%llu pll div=%d sigma_delta=%04x\n", |
154 | "%s: f_vco=%llu pll div=%d sigma_delta=%04x\n", | 153 | f_vco, buf[0], sigma_delta); |
155 | __func__, f_vco, buf[0], sigma_delta); | ||
156 | 154 | ||
157 | ret = regmap_bulk_write(s->regmap, 0x09, buf, 5); | 155 | ret = regmap_bulk_write(s->regmap, 0x09, buf, 5); |
158 | if (ret) | 156 | if (ret) |
@@ -253,7 +251,7 @@ static int e4000_set_params(struct dvb_frontend *fe) | |||
253 | goto err; | 251 | goto err; |
254 | err: | 252 | err: |
255 | if (ret) | 253 | if (ret) |
256 | dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); | 254 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
257 | 255 | ||
258 | return ret; | 256 | return ret; |
259 | } | 257 | } |
@@ -262,7 +260,7 @@ static int e4000_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) | |||
262 | { | 260 | { |
263 | struct e4000 *s = fe->tuner_priv; | 261 | struct e4000 *s = fe->tuner_priv; |
264 | 262 | ||
265 | dev_dbg(&s->client->dev, "%s:\n", __func__); | 263 | dev_dbg(&s->client->dev, "\n"); |
266 | 264 | ||
267 | *frequency = 0; /* Zero-IF */ | 265 | *frequency = 0; /* Zero-IF */ |
268 | 266 | ||
@@ -276,10 +274,9 @@ static int e4000_set_lna_gain(struct dvb_frontend *fe) | |||
276 | int ret; | 274 | int ret; |
277 | u8 u8tmp; | 275 | u8 u8tmp; |
278 | 276 | ||
279 | dev_dbg(&s->client->dev, "%s: lna auto=%d->%d val=%d->%d\n", | 277 | dev_dbg(&s->client->dev, "lna auto=%d->%d val=%d->%d\n", |
280 | __func__, s->lna_gain_auto->cur.val, | 278 | s->lna_gain_auto->cur.val, s->lna_gain_auto->val, |
281 | s->lna_gain_auto->val, s->lna_gain->cur.val, | 279 | s->lna_gain->cur.val, s->lna_gain->val); |
282 | s->lna_gain->val); | ||
283 | 280 | ||
284 | if (s->lna_gain_auto->val && s->if_gain_auto->cur.val) | 281 | if (s->lna_gain_auto->val && s->if_gain_auto->cur.val) |
285 | u8tmp = 0x17; | 282 | u8tmp = 0x17; |
@@ -301,7 +298,7 @@ static int e4000_set_lna_gain(struct dvb_frontend *fe) | |||
301 | } | 298 | } |
302 | err: | 299 | err: |
303 | if (ret) | 300 | if (ret) |
304 | dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); | 301 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
305 | 302 | ||
306 | return ret; | 303 | return ret; |
307 | } | 304 | } |
@@ -312,10 +309,9 @@ static int e4000_set_mixer_gain(struct dvb_frontend *fe) | |||
312 | int ret; | 309 | int ret; |
313 | u8 u8tmp; | 310 | u8 u8tmp; |
314 | 311 | ||
315 | dev_dbg(&s->client->dev, "%s: mixer auto=%d->%d val=%d->%d\n", | 312 | dev_dbg(&s->client->dev, "mixer auto=%d->%d val=%d->%d\n", |
316 | __func__, s->mixer_gain_auto->cur.val, | 313 | s->mixer_gain_auto->cur.val, s->mixer_gain_auto->val, |
317 | s->mixer_gain_auto->val, s->mixer_gain->cur.val, | 314 | s->mixer_gain->cur.val, s->mixer_gain->val); |
318 | s->mixer_gain->val); | ||
319 | 315 | ||
320 | if (s->mixer_gain_auto->val) | 316 | if (s->mixer_gain_auto->val) |
321 | u8tmp = 0x15; | 317 | u8tmp = 0x15; |
@@ -333,7 +329,7 @@ static int e4000_set_mixer_gain(struct dvb_frontend *fe) | |||
333 | } | 329 | } |
334 | err: | 330 | err: |
335 | if (ret) | 331 | if (ret) |
336 | dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); | 332 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
337 | 333 | ||
338 | return ret; | 334 | return ret; |
339 | } | 335 | } |
@@ -345,10 +341,9 @@ static int e4000_set_if_gain(struct dvb_frontend *fe) | |||
345 | u8 buf[2]; | 341 | u8 buf[2]; |
346 | u8 u8tmp; | 342 | u8 u8tmp; |
347 | 343 | ||
348 | dev_dbg(&s->client->dev, "%s: if auto=%d->%d val=%d->%d\n", | 344 | dev_dbg(&s->client->dev, "if auto=%d->%d val=%d->%d\n", |
349 | __func__, s->if_gain_auto->cur.val, | 345 | s->if_gain_auto->cur.val, s->if_gain_auto->val, |
350 | s->if_gain_auto->val, s->if_gain->cur.val, | 346 | s->if_gain->cur.val, s->if_gain->val); |
351 | s->if_gain->val); | ||
352 | 347 | ||
353 | if (s->if_gain_auto->val && s->lna_gain_auto->cur.val) | 348 | if (s->if_gain_auto->val && s->lna_gain_auto->cur.val) |
354 | u8tmp = 0x17; | 349 | u8tmp = 0x17; |
@@ -372,7 +367,7 @@ static int e4000_set_if_gain(struct dvb_frontend *fe) | |||
372 | } | 367 | } |
373 | err: | 368 | err: |
374 | if (ret) | 369 | if (ret) |
375 | dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); | 370 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
376 | 371 | ||
377 | return ret; | 372 | return ret; |
378 | } | 373 | } |
@@ -390,7 +385,7 @@ static int e4000_pll_lock(struct dvb_frontend *fe) | |||
390 | s->pll_lock->val = (utmp & 0x01); | 385 | s->pll_lock->val = (utmp & 0x01); |
391 | err: | 386 | err: |
392 | if (ret) | 387 | if (ret) |
393 | dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); | 388 | dev_dbg(&s->client->dev, "failed=%d\n", ret); |
394 | 389 | ||
395 | return ret; | 390 | return ret; |
396 | } | 391 | } |
@@ -408,8 +403,8 @@ static int e4000_g_volatile_ctrl(struct v4l2_ctrl *ctrl) | |||
408 | ret = e4000_pll_lock(s->fe); | 403 | ret = e4000_pll_lock(s->fe); |
409 | break; | 404 | break; |
410 | default: | 405 | default: |
411 | dev_dbg(&s->client->dev, "%s: unknown ctrl: id=%d name=%s\n", | 406 | dev_dbg(&s->client->dev, "unknown ctrl: id=%d name=%s\n", |
412 | __func__, ctrl->id, ctrl->name); | 407 | ctrl->id, ctrl->name); |
413 | ret = -EINVAL; | 408 | ret = -EINVAL; |
414 | } | 409 | } |
415 | 410 | ||
@@ -445,8 +440,8 @@ static int e4000_s_ctrl(struct v4l2_ctrl *ctrl) | |||
445 | ret = e4000_set_if_gain(s->fe); | 440 | ret = e4000_set_if_gain(s->fe); |
446 | break; | 441 | break; |
447 | default: | 442 | default: |
448 | dev_dbg(&s->client->dev, "%s: unknown ctrl: id=%d name=%s\n", | 443 | dev_dbg(&s->client->dev, "unknown ctrl: id=%d name=%s\n", |
449 | __func__, ctrl->id, ctrl->name); | 444 | ctrl->id, ctrl->name); |
450 | ret = -EINVAL; | 445 | ret = -EINVAL; |
451 | } | 446 | } |
452 | 447 | ||
@@ -494,7 +489,7 @@ static int e4000_probe(struct i2c_client *client, | |||
494 | s = kzalloc(sizeof(struct e4000), GFP_KERNEL); | 489 | s = kzalloc(sizeof(struct e4000), GFP_KERNEL); |
495 | if (!s) { | 490 | if (!s) { |
496 | ret = -ENOMEM; | 491 | ret = -ENOMEM; |
497 | dev_err(&client->dev, "%s: kzalloc() failed\n", KBUILD_MODNAME); | 492 | dev_err(&client->dev, "kzalloc() failed\n"); |
498 | goto err; | 493 | goto err; |
499 | } | 494 | } |
500 | 495 | ||
@@ -512,7 +507,7 @@ static int e4000_probe(struct i2c_client *client, | |||
512 | if (ret) | 507 | if (ret) |
513 | goto err; | 508 | goto err; |
514 | 509 | ||
515 | dev_dbg(&s->client->dev, "%s: chip id=%02x\n", __func__, utmp); | 510 | dev_dbg(&s->client->dev, "chip id=%02x\n", utmp); |
516 | 511 | ||
517 | if (utmp != 0x40) { | 512 | if (utmp != 0x40) { |
518 | ret = -ENODEV; | 513 | ret = -ENODEV; |
@@ -559,9 +554,7 @@ static int e4000_probe(struct i2c_client *client, | |||
559 | s->sd.ctrl_handler = &s->hdl; | 554 | s->sd.ctrl_handler = &s->hdl; |
560 | #endif | 555 | #endif |
561 | 556 | ||
562 | dev_info(&s->client->dev, | 557 | dev_info(&s->client->dev, "Elonics E4000 successfully identified\n"); |
563 | "%s: Elonics E4000 successfully identified\n", | ||
564 | KBUILD_MODNAME); | ||
565 | 558 | ||
566 | fe->tuner_priv = s; | 559 | fe->tuner_priv = s; |
567 | memcpy(&fe->ops.tuner_ops, &e4000_tuner_ops, | 560 | memcpy(&fe->ops.tuner_ops, &e4000_tuner_ops, |
@@ -573,7 +566,7 @@ static int e4000_probe(struct i2c_client *client, | |||
573 | return 0; | 566 | return 0; |
574 | err: | 567 | err: |
575 | if (ret) { | 568 | if (ret) { |
576 | dev_dbg(&client->dev, "%s: failed=%d\n", __func__, ret); | 569 | dev_dbg(&client->dev, "failed=%d\n", ret); |
577 | kfree(s); | 570 | kfree(s); |
578 | } | 571 | } |
579 | 572 | ||
@@ -586,7 +579,7 @@ static int e4000_remove(struct i2c_client *client) | |||
586 | struct e4000 *s = container_of(sd, struct e4000, sd); | 579 | struct e4000 *s = container_of(sd, struct e4000, sd); |
587 | struct dvb_frontend *fe = s->fe; | 580 | struct dvb_frontend *fe = s->fe; |
588 | 581 | ||
589 | dev_dbg(&client->dev, "%s:\n", __func__); | 582 | dev_dbg(&client->dev, "\n"); |
590 | 583 | ||
591 | #if IS_ENABLED(CONFIG_VIDEO_V4L2) | 584 | #if IS_ENABLED(CONFIG_VIDEO_V4L2) |
592 | v4l2_ctrl_handler_free(&s->hdl); | 585 | v4l2_ctrl_handler_free(&s->hdl); |