Commit 13bd82d1 authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] e4000: logging changes

Remove function name from debug logs. Logging system could add it
automatically.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent b63ab6b0
...@@ -26,7 +26,7 @@ static int e4000_init(struct dvb_frontend *fe) ...@@ -26,7 +26,7 @@ static int e4000_init(struct dvb_frontend *fe)
struct e4000 *s = fe->tuner_priv; struct e4000 *s = fe->tuner_priv;
int ret; int ret;
dev_dbg(&s->client->dev, "%s:\n", __func__); dev_dbg(&s->client->dev, "\n");
/* dummy I2C to ensure I2C wakes up */ /* dummy I2C to ensure I2C wakes up */
ret = regmap_write(s->regmap, 0x02, 0x40); ret = regmap_write(s->regmap, 0x02, 0x40);
...@@ -87,7 +87,7 @@ static int e4000_init(struct dvb_frontend *fe) ...@@ -87,7 +87,7 @@ static int e4000_init(struct dvb_frontend *fe)
s->active = true; s->active = true;
err: err:
if (ret) if (ret)
dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret; return ret;
} }
...@@ -97,7 +97,7 @@ static int e4000_sleep(struct dvb_frontend *fe) ...@@ -97,7 +97,7 @@ static int e4000_sleep(struct dvb_frontend *fe)
struct e4000 *s = fe->tuner_priv; struct e4000 *s = fe->tuner_priv;
int ret; int ret;
dev_dbg(&s->client->dev, "%s:\n", __func__); dev_dbg(&s->client->dev, "\n");
s->active = false; s->active = false;
...@@ -106,7 +106,7 @@ static int e4000_sleep(struct dvb_frontend *fe) ...@@ -106,7 +106,7 @@ static int e4000_sleep(struct dvb_frontend *fe)
goto err; goto err;
err: err:
if (ret) if (ret)
dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret; return ret;
} }
...@@ -121,9 +121,8 @@ static int e4000_set_params(struct dvb_frontend *fe) ...@@ -121,9 +121,8 @@ static int e4000_set_params(struct dvb_frontend *fe)
u8 buf[5], i_data[4], q_data[4]; u8 buf[5], i_data[4], q_data[4];
dev_dbg(&s->client->dev, dev_dbg(&s->client->dev,
"%s: delivery_system=%d frequency=%u bandwidth_hz=%u\n", "delivery_system=%d frequency=%u bandwidth_hz=%u\n",
__func__, c->delivery_system, c->frequency, c->delivery_system, c->frequency, c->bandwidth_hz);
c->bandwidth_hz);
/* gain control manual */ /* gain control manual */
ret = regmap_write(s->regmap, 0x1a, 0x00); ret = regmap_write(s->regmap, 0x1a, 0x00);
...@@ -150,9 +149,8 @@ static int e4000_set_params(struct dvb_frontend *fe) ...@@ -150,9 +149,8 @@ static int e4000_set_params(struct dvb_frontend *fe)
buf[3] = 0x00; buf[3] = 0x00;
buf[4] = e4000_pll_lut[i].div; buf[4] = e4000_pll_lut[i].div;
dev_dbg(&s->client->dev, dev_dbg(&s->client->dev, "f_vco=%llu pll div=%d sigma_delta=%04x\n",
"%s: f_vco=%llu pll div=%d sigma_delta=%04x\n", f_vco, buf[0], sigma_delta);
__func__, f_vco, buf[0], sigma_delta);
ret = regmap_bulk_write(s->regmap, 0x09, buf, 5); ret = regmap_bulk_write(s->regmap, 0x09, buf, 5);
if (ret) if (ret)
...@@ -253,7 +251,7 @@ static int e4000_set_params(struct dvb_frontend *fe) ...@@ -253,7 +251,7 @@ static int e4000_set_params(struct dvb_frontend *fe)
goto err; goto err;
err: err:
if (ret) if (ret)
dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret; return ret;
} }
...@@ -262,7 +260,7 @@ static int e4000_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) ...@@ -262,7 +260,7 @@ static int e4000_get_if_frequency(struct dvb_frontend *fe, u32 *frequency)
{ {
struct e4000 *s = fe->tuner_priv; struct e4000 *s = fe->tuner_priv;
dev_dbg(&s->client->dev, "%s:\n", __func__); dev_dbg(&s->client->dev, "\n");
*frequency = 0; /* Zero-IF */ *frequency = 0; /* Zero-IF */
...@@ -276,10 +274,9 @@ static int e4000_set_lna_gain(struct dvb_frontend *fe) ...@@ -276,10 +274,9 @@ static int e4000_set_lna_gain(struct dvb_frontend *fe)
int ret; int ret;
u8 u8tmp; u8 u8tmp;
dev_dbg(&s->client->dev, "%s: lna auto=%d->%d val=%d->%d\n", dev_dbg(&s->client->dev, "lna auto=%d->%d val=%d->%d\n",
__func__, s->lna_gain_auto->cur.val, s->lna_gain_auto->cur.val, s->lna_gain_auto->val,
s->lna_gain_auto->val, s->lna_gain->cur.val, s->lna_gain->cur.val, s->lna_gain->val);
s->lna_gain->val);
if (s->lna_gain_auto->val && s->if_gain_auto->cur.val) if (s->lna_gain_auto->val && s->if_gain_auto->cur.val)
u8tmp = 0x17; u8tmp = 0x17;
...@@ -301,7 +298,7 @@ static int e4000_set_lna_gain(struct dvb_frontend *fe) ...@@ -301,7 +298,7 @@ static int e4000_set_lna_gain(struct dvb_frontend *fe)
} }
err: err:
if (ret) if (ret)
dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret; return ret;
} }
...@@ -312,10 +309,9 @@ static int e4000_set_mixer_gain(struct dvb_frontend *fe) ...@@ -312,10 +309,9 @@ static int e4000_set_mixer_gain(struct dvb_frontend *fe)
int ret; int ret;
u8 u8tmp; u8 u8tmp;
dev_dbg(&s->client->dev, "%s: mixer auto=%d->%d val=%d->%d\n", dev_dbg(&s->client->dev, "mixer auto=%d->%d val=%d->%d\n",
__func__, s->mixer_gain_auto->cur.val, s->mixer_gain_auto->cur.val, s->mixer_gain_auto->val,
s->mixer_gain_auto->val, s->mixer_gain->cur.val, s->mixer_gain->cur.val, s->mixer_gain->val);
s->mixer_gain->val);
if (s->mixer_gain_auto->val) if (s->mixer_gain_auto->val)
u8tmp = 0x15; u8tmp = 0x15;
...@@ -333,7 +329,7 @@ static int e4000_set_mixer_gain(struct dvb_frontend *fe) ...@@ -333,7 +329,7 @@ static int e4000_set_mixer_gain(struct dvb_frontend *fe)
} }
err: err:
if (ret) if (ret)
dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret; return ret;
} }
...@@ -345,10 +341,9 @@ static int e4000_set_if_gain(struct dvb_frontend *fe) ...@@ -345,10 +341,9 @@ static int e4000_set_if_gain(struct dvb_frontend *fe)
u8 buf[2]; u8 buf[2];
u8 u8tmp; u8 u8tmp;
dev_dbg(&s->client->dev, "%s: if auto=%d->%d val=%d->%d\n", dev_dbg(&s->client->dev, "if auto=%d->%d val=%d->%d\n",
__func__, s->if_gain_auto->cur.val, s->if_gain_auto->cur.val, s->if_gain_auto->val,
s->if_gain_auto->val, s->if_gain->cur.val, s->if_gain->cur.val, s->if_gain->val);
s->if_gain->val);
if (s->if_gain_auto->val && s->lna_gain_auto->cur.val) if (s->if_gain_auto->val && s->lna_gain_auto->cur.val)
u8tmp = 0x17; u8tmp = 0x17;
...@@ -372,7 +367,7 @@ static int e4000_set_if_gain(struct dvb_frontend *fe) ...@@ -372,7 +367,7 @@ static int e4000_set_if_gain(struct dvb_frontend *fe)
} }
err: err:
if (ret) if (ret)
dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret; return ret;
} }
...@@ -390,7 +385,7 @@ static int e4000_pll_lock(struct dvb_frontend *fe) ...@@ -390,7 +385,7 @@ static int e4000_pll_lock(struct dvb_frontend *fe)
s->pll_lock->val = (utmp & 0x01); s->pll_lock->val = (utmp & 0x01);
err: err:
if (ret) if (ret)
dev_dbg(&s->client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&s->client->dev, "failed=%d\n", ret);
return ret; return ret;
} }
...@@ -408,8 +403,8 @@ static int e4000_g_volatile_ctrl(struct v4l2_ctrl *ctrl) ...@@ -408,8 +403,8 @@ static int e4000_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
ret = e4000_pll_lock(s->fe); ret = e4000_pll_lock(s->fe);
break; break;
default: default:
dev_dbg(&s->client->dev, "%s: unknown ctrl: id=%d name=%s\n", dev_dbg(&s->client->dev, "unknown ctrl: id=%d name=%s\n",
__func__, ctrl->id, ctrl->name); ctrl->id, ctrl->name);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -445,8 +440,8 @@ static int e4000_s_ctrl(struct v4l2_ctrl *ctrl) ...@@ -445,8 +440,8 @@ static int e4000_s_ctrl(struct v4l2_ctrl *ctrl)
ret = e4000_set_if_gain(s->fe); ret = e4000_set_if_gain(s->fe);
break; break;
default: default:
dev_dbg(&s->client->dev, "%s: unknown ctrl: id=%d name=%s\n", dev_dbg(&s->client->dev, "unknown ctrl: id=%d name=%s\n",
__func__, ctrl->id, ctrl->name); ctrl->id, ctrl->name);
ret = -EINVAL; ret = -EINVAL;
} }
...@@ -494,7 +489,7 @@ static int e4000_probe(struct i2c_client *client, ...@@ -494,7 +489,7 @@ static int e4000_probe(struct i2c_client *client,
s = kzalloc(sizeof(struct e4000), GFP_KERNEL); s = kzalloc(sizeof(struct e4000), GFP_KERNEL);
if (!s) { if (!s) {
ret = -ENOMEM; ret = -ENOMEM;
dev_err(&client->dev, "%s: kzalloc() failed\n", KBUILD_MODNAME); dev_err(&client->dev, "kzalloc() failed\n");
goto err; goto err;
} }
...@@ -512,7 +507,7 @@ static int e4000_probe(struct i2c_client *client, ...@@ -512,7 +507,7 @@ static int e4000_probe(struct i2c_client *client,
if (ret) if (ret)
goto err; goto err;
dev_dbg(&s->client->dev, "%s: chip id=%02x\n", __func__, utmp); dev_dbg(&s->client->dev, "chip id=%02x\n", utmp);
if (utmp != 0x40) { if (utmp != 0x40) {
ret = -ENODEV; ret = -ENODEV;
...@@ -559,9 +554,7 @@ static int e4000_probe(struct i2c_client *client, ...@@ -559,9 +554,7 @@ static int e4000_probe(struct i2c_client *client,
s->sd.ctrl_handler = &s->hdl; s->sd.ctrl_handler = &s->hdl;
#endif #endif
dev_info(&s->client->dev, dev_info(&s->client->dev, "Elonics E4000 successfully identified\n");
"%s: Elonics E4000 successfully identified\n",
KBUILD_MODNAME);
fe->tuner_priv = s; fe->tuner_priv = s;
memcpy(&fe->ops.tuner_ops, &e4000_tuner_ops, memcpy(&fe->ops.tuner_ops, &e4000_tuner_ops,
...@@ -573,7 +566,7 @@ static int e4000_probe(struct i2c_client *client, ...@@ -573,7 +566,7 @@ static int e4000_probe(struct i2c_client *client,
return 0; return 0;
err: err:
if (ret) { if (ret) {
dev_dbg(&client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&client->dev, "failed=%d\n", ret);
kfree(s); kfree(s);
} }
...@@ -586,7 +579,7 @@ static int e4000_remove(struct i2c_client *client) ...@@ -586,7 +579,7 @@ static int e4000_remove(struct i2c_client *client)
struct e4000 *s = container_of(sd, struct e4000, sd); struct e4000 *s = container_of(sd, struct e4000, sd);
struct dvb_frontend *fe = s->fe; struct dvb_frontend *fe = s->fe;
dev_dbg(&client->dev, "%s:\n", __func__); dev_dbg(&client->dev, "\n");
#if IS_ENABLED(CONFIG_VIDEO_V4L2) #if IS_ENABLED(CONFIG_VIDEO_V4L2)
v4l2_ctrl_handler_free(&s->hdl); v4l2_ctrl_handler_free(&s->hdl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment