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

[media] tda18212: clean logging

There is no need to print module name nor function name as those
are done by kernel logging system when dev_xxx logging is used and
driver is proper I2C driver.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 0e584cc2
...@@ -47,8 +47,8 @@ static int tda18212_wr_regs(struct tda18212_priv *priv, u8 reg, u8 *val, ...@@ -47,8 +47,8 @@ static int tda18212_wr_regs(struct tda18212_priv *priv, u8 reg, u8 *val,
if (1 + len > sizeof(buf)) { if (1 + len > sizeof(buf)) {
dev_warn(&priv->client->dev, dev_warn(&priv->client->dev,
"%s: i2c wr reg=%04x: len=%d is too big!\n", "i2c wr reg=%04x: len=%d is too big!\n",
KBUILD_MODNAME, reg, len); reg, len);
return -EINVAL; return -EINVAL;
} }
...@@ -59,8 +59,9 @@ static int tda18212_wr_regs(struct tda18212_priv *priv, u8 reg, u8 *val, ...@@ -59,8 +59,9 @@ static int tda18212_wr_regs(struct tda18212_priv *priv, u8 reg, u8 *val,
if (ret == 1) { if (ret == 1) {
ret = 0; ret = 0;
} else { } else {
dev_warn(&priv->client->dev, "%s: i2c wr failed=%d reg=%02x len=%d\n", dev_warn(&priv->client->dev,
KBUILD_MODNAME, ret, reg, len); "i2c wr failed=%d reg=%02x len=%d\n",
ret, reg, len);
ret = -EREMOTEIO; ret = -EREMOTEIO;
} }
return ret; return ret;
...@@ -88,8 +89,8 @@ static int tda18212_rd_regs(struct tda18212_priv *priv, u8 reg, u8 *val, ...@@ -88,8 +89,8 @@ static int tda18212_rd_regs(struct tda18212_priv *priv, u8 reg, u8 *val,
if (len > sizeof(buf)) { if (len > sizeof(buf)) {
dev_warn(&priv->client->dev, dev_warn(&priv->client->dev,
"%s: i2c rd reg=%04x: len=%d is too big!\n", "i2c rd reg=%04x: len=%d is too big!\n",
KBUILD_MODNAME, reg, len); reg, len);
return -EINVAL; return -EINVAL;
} }
...@@ -98,8 +99,9 @@ static int tda18212_rd_regs(struct tda18212_priv *priv, u8 reg, u8 *val, ...@@ -98,8 +99,9 @@ static int tda18212_rd_regs(struct tda18212_priv *priv, u8 reg, u8 *val,
memcpy(val, buf, len); memcpy(val, buf, len);
ret = 0; ret = 0;
} else { } else {
dev_warn(&priv->client->dev, "%s: i2c rd failed=%d reg=%02x len=%d\n", dev_warn(&priv->client->dev,
KBUILD_MODNAME, ret, reg, len); "i2c rd failed=%d reg=%02x len=%d\n",
ret, reg, len);
ret = -EREMOTEIO; ret = -EREMOTEIO;
} }
...@@ -167,8 +169,8 @@ static int tda18212_set_params(struct dvb_frontend *fe) ...@@ -167,8 +169,8 @@ static int tda18212_set_params(struct dvb_frontend *fe)
}; };
dev_dbg(&priv->client->dev, dev_dbg(&priv->client->dev,
"%s: delivery_system=%d frequency=%d bandwidth_hz=%d\n", "delivery_system=%d frequency=%d bandwidth_hz=%d\n",
__func__, c->delivery_system, c->frequency, c->delivery_system, c->frequency,
c->bandwidth_hz); c->bandwidth_hz);
if (fe->ops.i2c_gate_ctrl) if (fe->ops.i2c_gate_ctrl)
...@@ -266,7 +268,7 @@ static int tda18212_set_params(struct dvb_frontend *fe) ...@@ -266,7 +268,7 @@ static int tda18212_set_params(struct dvb_frontend *fe)
return ret; return ret;
error: error:
dev_dbg(&priv->client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&priv->client->dev, "failed=%d\n", ret);
goto exit; goto exit;
} }
...@@ -305,7 +307,7 @@ static int tda18212_probe(struct i2c_client *client, ...@@ -305,7 +307,7 @@ static int tda18212_probe(struct i2c_client *client,
priv = kzalloc(sizeof(*priv), GFP_KERNEL); priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) { if (!priv) {
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;
} }
...@@ -317,7 +319,7 @@ static int tda18212_probe(struct i2c_client *client, ...@@ -317,7 +319,7 @@ static int tda18212_probe(struct i2c_client *client,
fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */ fe->ops.i2c_gate_ctrl(fe, 1); /* open I2C-gate */
ret = tda18212_rd_reg(priv, 0x00, &chip_id); ret = tda18212_rd_reg(priv, 0x00, &chip_id);
dev_dbg(&priv->client->dev, "%s: chip_id=%02x\n", __func__, chip_id); dev_dbg(&priv->client->dev, "chip_id=%02x\n", chip_id);
if (fe->ops.i2c_gate_ctrl) if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */
...@@ -338,8 +340,7 @@ static int tda18212_probe(struct i2c_client *client, ...@@ -338,8 +340,7 @@ static int tda18212_probe(struct i2c_client *client,
} }
dev_info(&priv->client->dev, dev_info(&priv->client->dev,
"%s: NXP TDA18212HN/%s successfully identified\n", "NXP TDA18212HN/%s successfully identified\n", version);
KBUILD_MODNAME, version);
fe->tuner_priv = priv; fe->tuner_priv = priv;
memcpy(&fe->ops.tuner_ops, &tda18212_tuner_ops, memcpy(&fe->ops.tuner_ops, &tda18212_tuner_ops,
...@@ -348,7 +349,7 @@ static int tda18212_probe(struct i2c_client *client, ...@@ -348,7 +349,7 @@ static int tda18212_probe(struct i2c_client *client,
return 0; return 0;
err: err:
dev_dbg(&client->dev, "%s: failed=%d\n", __func__, ret); dev_dbg(&client->dev, "failed=%d\n", ret);
kfree(priv); kfree(priv);
return ret; return ret;
} }
...@@ -358,7 +359,7 @@ static int tda18212_remove(struct i2c_client *client) ...@@ -358,7 +359,7 @@ static int tda18212_remove(struct i2c_client *client)
struct tda18212_priv *priv = i2c_get_clientdata(client); struct tda18212_priv *priv = i2c_get_clientdata(client);
struct dvb_frontend *fe = priv->cfg.fe; struct dvb_frontend *fe = priv->cfg.fe;
dev_dbg(&client->dev, "%s:\n", __func__); dev_dbg(&client->dev, "\n");
memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
fe->tuner_priv = NULL; fe->tuner_priv = NULL;
......
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