diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-16 18:11:46 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-16 18:11:46 -0500 |
commit | 29f28adf65d38e079fc3f90a62920be6f9b27d0b (patch) | |
tree | 773b22b79259e14f4547ae50f2df031cd3c03594 /linux/drivers/media/video/tda9887.c | |
parent | ebba1f853c5fce4cb1921b1b1c976aa7861f4594 (diff) | |
download | mediapointer-dvb-s2-29f28adf65d38e079fc3f90a62920be6f9b27d0b.tar.gz mediapointer-dvb-s2-29f28adf65d38e079fc3f90a62920be6f9b27d0b.tar.bz2 |
tda9887: remove dependency on struct tuner
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/tda9887.c')
-rw-r--r-- | linux/drivers/media/video/tda9887.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c index 039afe418..2eb554d06 100644 --- a/linux/drivers/media/video/tda9887.c +++ b/linux/drivers/media/video/tda9887.c @@ -13,6 +13,7 @@ #endif #include <media/v4l2-common.h> #include <media/tuner.h> +#include "tuner-driver.h" #include "tuner-i2c.h" #include "tda9887.h" @@ -676,26 +677,25 @@ static struct analog_tuner_ops tda9887_tuner_ops = { .set_config = tda9887_set_config, }; -int tda9887_attach(struct tuner *t) +struct dvb_frontend *tda9887_attach(struct dvb_frontend *fe, + struct i2c_adapter *i2c_adap, + u8 i2c_addr) { struct tda9887_priv *priv = NULL; priv = kzalloc(sizeof(struct tda9887_priv), GFP_KERNEL); if (priv == NULL) - return -ENOMEM; - t->fe.analog_demod_priv = priv; + return NULL; + fe->analog_demod_priv = priv; - priv->i2c_props.addr = t->i2c->addr; - priv->i2c_props.adap = t->i2c->adapter; + priv->i2c_props.addr = i2c_addr; + priv->i2c_props.adap = i2c_adap; - strlcpy(t->i2c->name, "tda9887", sizeof(t->i2c->name)); + tda9887_info("tda988[5/6/7] found\n"); - tda9887_info("tda988[5/6/7] found @ 0x%x (%s)\n", t->i2c->addr, - t->i2c->driver->driver.name); + fe->ops.analog_demod_ops = &tda9887_tuner_ops; - t->fe.ops.analog_demod_ops = &tda9887_tuner_ops; - - return 0; + return fe; } EXPORT_SYMBOL_GPL(tda9887_attach); |