aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tda9887.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-12-16 18:11:46 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:55 -0500
commit8ca4083b50752d588f8b8b1e5e5776fb17d00304 (patch)
tree3a52ef63a3d60b2cddf0d88823fe4da640724abe /drivers/media/video/tda9887.c
parent91c9d4a16710b047781248a38e7000ce9de324af (diff)
V4L/DVB (6842): tda9887: remove dependency on struct tuner
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tda9887.c')
-rw-r--r--drivers/media/video/tda9887.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index 95d974298fe9..0b5dc37fea51 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -9,6 +9,7 @@
9#include <linux/videodev.h> 9#include <linux/videodev.h>
10#include <media/v4l2-common.h> 10#include <media/v4l2-common.h>
11#include <media/tuner.h> 11#include <media/tuner.h>
12#include "tuner-driver.h"
12#include "tuner-i2c.h" 13#include "tuner-i2c.h"
13#include "tda9887.h" 14#include "tda9887.h"
14 15
@@ -665,26 +666,25 @@ static struct analog_tuner_ops tda9887_tuner_ops = {
665 .set_config = tda9887_set_config, 666 .set_config = tda9887_set_config,
666}; 667};
667 668
668int tda9887_attach(struct tuner *t) 669struct dvb_frontend *tda9887_attach(struct dvb_frontend *fe,
670 struct i2c_adapter *i2c_adap,
671 u8 i2c_addr)
669{ 672{
670 struct tda9887_priv *priv = NULL; 673 struct tda9887_priv *priv = NULL;
671 674
672 priv = kzalloc(sizeof(struct tda9887_priv), GFP_KERNEL); 675 priv = kzalloc(sizeof(struct tda9887_priv), GFP_KERNEL);
673 if (priv == NULL) 676 if (priv == NULL)
674 return -ENOMEM; 677 return NULL;
675 t->fe.analog_demod_priv = priv; 678 fe->analog_demod_priv = priv;
676 679
677 priv->i2c_props.addr = t->i2c->addr; 680 priv->i2c_props.addr = i2c_addr;
678 priv->i2c_props.adap = t->i2c->adapter; 681 priv->i2c_props.adap = i2c_adap;
679 682
680 strlcpy(t->i2c->name, "tda9887", sizeof(t->i2c->name)); 683 tda9887_info("tda988[5/6/7] found\n");
681 684
682 tda9887_info("tda988[5/6/7] found @ 0x%x (%s)\n", t->i2c->addr, 685 fe->ops.analog_demod_ops = &tda9887_tuner_ops;
683 t->i2c->driver->driver.name);
684 686
685 t->fe.ops.analog_demod_ops = &tda9887_tuner_ops; 687 return fe;
686
687 return 0;
688} 688}
689EXPORT_SYMBOL_GPL(tda9887_attach); 689EXPORT_SYMBOL_GPL(tda9887_attach);
690 690