diff options
author | Antti Palosaari <crope@iki.fi> | 2014-12-13 04:21:04 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-03 19:01:25 +0100 |
commit | ac32ee42cc880e62ab6dcb05372767f31ba4a19b (patch) | |
tree | c9c8ca249399a0ddad6b0902c449f4b6b4f19d81 /drivers/media/dvb-frontends/rtl2832.c | |
parent | [media] rtl28xxu: use rtl2832 demod callbacks accessing its resources (diff) | |
download | linux-ac32ee42cc880e62ab6dcb05372767f31ba4a19b.tar.xz linux-ac32ee42cc880e62ab6dcb05372767f31ba4a19b.zip |
[media] rtl2832: remove exported resources
Exported resources are not needed anymore as all users are using
callbacks carried via platform data. Due to that we will remove
those.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/rtl2832.c')
-rw-r--r-- | drivers/media/dvb-frontends/rtl2832.c | 138 |
1 files changed, 0 insertions, 138 deletions
diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c index 8c36a8415c4c..2316a2ad410a 100644 --- a/drivers/media/dvb-frontends/rtl2832.c +++ b/drivers/media/dvb-frontends/rtl2832.c @@ -886,19 +886,6 @@ err: return ret; } -static struct dvb_frontend_ops rtl2832_ops; - -static void rtl2832_release(struct dvb_frontend *fe) -{ - struct rtl2832_priv *priv = fe->demodulator_priv; - - dev_dbg(&priv->i2c->dev, "%s:\n", __func__); - cancel_delayed_work_sync(&priv->i2c_gate_work); - i2c_del_mux_adapter(priv->i2c_adapter_tuner); - i2c_del_mux_adapter(priv->i2c_adapter); - kfree(priv); -} - /* * Delay mechanism to avoid unneeded I2C gate open / close. Gate close is * delayed here a little bit in order to see if there is sequence of I2C @@ -1022,126 +1009,6 @@ static int rtl2832_deselect(struct i2c_adapter *adap, void *mux_priv, return 0; } -int rtl2832_enable_external_ts_if(struct dvb_frontend *fe) -{ - struct rtl2832_priv *priv = fe->demodulator_priv; - int ret; - - dev_dbg(&priv->i2c->dev, "%s: setting PIP mode\n", __func__); - - ret = rtl2832_wr_regs(priv, 0x0c, 1, "\x5f\xff", 2); - if (ret) - goto err; - - ret = rtl2832_wr_demod_reg(priv, DVBT_PIP_ON, 0x1); - if (ret) - goto err; - - ret = rtl2832_wr_reg(priv, 0xbc, 0, 0x18); - if (ret) - goto err; - - ret = rtl2832_wr_reg(priv, 0x22, 0, 0x01); - if (ret) - goto err; - - ret = rtl2832_wr_reg(priv, 0x26, 0, 0x1f); - if (ret) - goto err; - - ret = rtl2832_wr_reg(priv, 0x27, 0, 0xff); - if (ret) - goto err; - - ret = rtl2832_wr_regs(priv, 0x92, 1, "\x7f\xf7\xff", 3); - if (ret) - goto err; - - /* soft reset */ - ret = rtl2832_wr_demod_reg(priv, DVBT_SOFT_RST, 0x1); - if (ret) - goto err; - - ret = rtl2832_wr_demod_reg(priv, DVBT_SOFT_RST, 0x0); - if (ret) - goto err; - - return 0; -err: - dev_dbg(&priv->i2c->dev, "%s: failed=%d\n", __func__, ret); - return ret; - -} -EXPORT_SYMBOL(rtl2832_enable_external_ts_if); - -struct i2c_adapter *rtl2832_get_i2c_adapter(struct dvb_frontend *fe) -{ - struct rtl2832_priv *priv = fe->demodulator_priv; - return priv->i2c_adapter_tuner; -} -EXPORT_SYMBOL(rtl2832_get_i2c_adapter); - -struct i2c_adapter *rtl2832_get_private_i2c_adapter(struct dvb_frontend *fe) -{ - struct rtl2832_priv *priv = fe->demodulator_priv; - return priv->i2c_adapter; -} -EXPORT_SYMBOL(rtl2832_get_private_i2c_adapter); - -struct dvb_frontend *rtl2832_attach(const struct rtl2832_config *cfg, - struct i2c_adapter *i2c) -{ - struct rtl2832_priv *priv = NULL; - int ret = 0; - u8 tmp; - - dev_dbg(&i2c->dev, "%s:\n", __func__); - - /* allocate memory for the internal state */ - priv = kzalloc(sizeof(struct rtl2832_priv), GFP_KERNEL); - if (priv == NULL) - goto err; - - /* setup the priv */ - priv->i2c = i2c; - priv->tuner = cfg->tuner; - memcpy(&priv->cfg, cfg, sizeof(struct rtl2832_config)); - INIT_DELAYED_WORK(&priv->i2c_gate_work, rtl2832_i2c_gate_work); - - /* create muxed i2c adapter for demod itself */ - priv->i2c_adapter = i2c_add_mux_adapter(i2c, &i2c->dev, priv, 0, 0, 0, - rtl2832_select, NULL); - if (priv->i2c_adapter == NULL) - goto err; - - /* check if the demod is there */ - ret = rtl2832_rd_reg(priv, 0x00, 0x0, &tmp); - if (ret) - goto err; - - /* create muxed i2c adapter for demod tuner bus */ - priv->i2c_adapter_tuner = i2c_add_mux_adapter(i2c, &i2c->dev, priv, - 0, 1, 0, rtl2832_select, rtl2832_deselect); - if (priv->i2c_adapter_tuner == NULL) - goto err; - - /* create dvb_frontend */ - memcpy(&priv->fe.ops, &rtl2832_ops, sizeof(struct dvb_frontend_ops)); - priv->fe.demodulator_priv = priv; - - /* TODO implement sleep mode */ - priv->sleeping = true; - - return &priv->fe; -err: - dev_dbg(&i2c->dev, "%s: failed=%d\n", __func__, ret); - if (priv && priv->i2c_adapter) - i2c_del_mux_adapter(priv->i2c_adapter); - kfree(priv); - return NULL; -} -EXPORT_SYMBOL(rtl2832_attach); - static struct dvb_frontend_ops rtl2832_ops = { .delsys = { SYS_DVBT }, .info = { @@ -1166,8 +1033,6 @@ static struct dvb_frontend_ops rtl2832_ops = { FE_CAN_MUTE_TS }, - .release = rtl2832_release, - .init = rtl2832_init, .sleep = rtl2832_sleep, @@ -1307,11 +1172,8 @@ static int rtl2832_probe(struct i2c_client *client, /* create dvb_frontend */ memcpy(&priv->fe.ops, &rtl2832_ops, sizeof(struct dvb_frontend_ops)); - priv->fe.ops.release = NULL; priv->fe.demodulator_priv = priv; i2c_set_clientdata(client, priv); - if (pdata->dvb_frontend) - *pdata->dvb_frontend = &priv->fe; /* setup callbacks */ pdata->get_dvb_frontend = rtl2832_get_dvb_frontend; |