diff options
author | Antti Palosaari <crope@iki.fi> | 2016-08-09 22:00:37 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-22 10:41:53 -0300 |
commit | c98975f92c1d488b273f10edfc6c48bab1c6e046 (patch) | |
tree | f982467803361e68574b245dd1f5c3ad4586e09b /drivers/media/dvb-frontends/cxd2820r_t2.c | |
parent | 07fdf7d9f19fb601a0cc75c47ecd55aa26019eed (diff) | |
download | linux-stable-c98975f92c1d488b273f10edfc6c48bab1c6e046.tar.gz linux-stable-c98975f92c1d488b273f10edfc6c48bab1c6e046.tar.bz2 linux-stable-c98975f92c1d488b273f10edfc6c48bab1c6e046.zip |
[media] cxd2820r: correct logging
Use correct device for logging functions as we now have it due to
proper I2C client bindings.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/cxd2820r_t2.c')
-rw-r--r-- | drivers/media/dvb-frontends/cxd2820r_t2.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/media/dvb-frontends/cxd2820r_t2.c b/drivers/media/dvb-frontends/cxd2820r_t2.c index 3a2c198153a3..939a68d808f8 100644 --- a/drivers/media/dvb-frontends/cxd2820r_t2.c +++ b/drivers/media/dvb-frontends/cxd2820r_t2.c @@ -23,8 +23,9 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe) { - struct dtv_frontend_properties *c = &fe->dtv_property_cache; struct cxd2820r_priv *priv = fe->demodulator_priv; + struct i2c_client *client = priv->client[0]; + struct dtv_frontend_properties *c = &fe->dtv_property_cache; int ret, i, bw_i; unsigned int utmp; u32 if_frequency; @@ -69,8 +70,10 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe) { 0x027ef, 0x10, 0x18 }, }; - dev_dbg(&priv->i2c->dev, "%s: frequency=%d bandwidth_hz=%d\n", __func__, - c->frequency, c->bandwidth_hz); + dev_dbg(&client->dev, + "delivery_system=%d modulation=%d frequency=%u bandwidth_hz=%u inversion=%d stream_id=%u\n", + c->delivery_system, c->modulation, c->frequency, + c->bandwidth_hz, c->inversion, c->stream_id); switch (c->bandwidth_hz) { case 5000000: @@ -113,8 +116,7 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe) ret = fe->ops.tuner_ops.get_if_frequency(fe, &if_frequency); if (ret) goto error; - dev_dbg(&priv->i2c->dev, "%s: if_frequency=%u\n", __func__, - if_frequency); + dev_dbg(&client->dev, "if_frequency=%u\n", if_frequency); } else { ret = -EINVAL; goto error; @@ -130,13 +132,12 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe) /* PLP filtering */ if (c->stream_id > 255) { - dev_dbg(&priv->i2c->dev, "%s: Disable PLP filtering\n", __func__); + dev_dbg(&client->dev, "disable PLP filtering\n"); ret = cxd2820r_wr_reg(priv, 0x023ad , 0); if (ret) goto error; } else { - dev_dbg(&priv->i2c->dev, "%s: Enable PLP filtering = %d\n", __func__, - c->stream_id); + dev_dbg(&client->dev, "enable PLP filtering\n"); ret = cxd2820r_wr_reg(priv, 0x023af , c->stream_id & 0xFF); if (ret) goto error; @@ -163,7 +164,7 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe) return ret; error: - dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); + dev_dbg(&client->dev, "failed=%d\n", ret); return ret; } @@ -172,9 +173,12 @@ int cxd2820r_get_frontend_t2(struct dvb_frontend *fe, struct dtv_frontend_properties *c) { struct cxd2820r_priv *priv = fe->demodulator_priv; + struct i2c_client *client = priv->client[0]; int ret; u8 buf[2]; + dev_dbg(&client->dev, "\n"); + ret = cxd2820r_rd_regs(priv, 0x0205c, buf, 2); if (ret) goto error; @@ -279,7 +283,7 @@ int cxd2820r_get_frontend_t2(struct dvb_frontend *fe, return ret; error: - dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); + dev_dbg(&client->dev, "failed=%d\n", ret); return ret; } @@ -287,6 +291,7 @@ int cxd2820r_read_status_t2(struct dvb_frontend *fe, enum fe_status *status) { struct cxd2820r_priv *priv = fe->demodulator_priv; struct dtv_frontend_properties *c = &fe->dtv_property_cache; + struct i2c_client *client = priv->client[0]; int ret; unsigned int utmp; u8 buf[4]; @@ -306,7 +311,7 @@ int cxd2820r_read_status_t2(struct dvb_frontend *fe, enum fe_status *status) } } - dev_dbg(&priv->i2c->dev, "%s: lock=%02x\n", __func__, buf[0]); + dev_dbg(&client->dev, "lock=%*ph\n", 1, buf); /* Signal strength */ if (*status & FE_HAS_SIGNAL) { @@ -383,13 +388,14 @@ int cxd2820r_read_status_t2(struct dvb_frontend *fe, enum fe_status *status) return ret; error: - dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); + dev_dbg(&client->dev, "failed=%d\n", ret); return ret; } int cxd2820r_sleep_t2(struct dvb_frontend *fe) { struct cxd2820r_priv *priv = fe->demodulator_priv; + struct i2c_client *client = priv->client[0]; int ret, i; struct reg_val_mask tab[] = { { 0x000ff, 0x1f, 0xff }, @@ -400,7 +406,7 @@ int cxd2820r_sleep_t2(struct dvb_frontend *fe) { 0x00080, 0x00, 0xff }, }; - dev_dbg(&priv->i2c->dev, "%s\n", __func__); + dev_dbg(&client->dev, "\n"); for (i = 0; i < ARRAY_SIZE(tab); i++) { ret = cxd2820r_wr_reg_mask(priv, tab[i].reg, tab[i].val, @@ -413,7 +419,7 @@ int cxd2820r_sleep_t2(struct dvb_frontend *fe) return ret; error: - dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); + dev_dbg(&client->dev, "failed=%d\n", ret); return ret; } |