summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tda9887.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-10-21 19:48:48 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2007-10-21 19:48:48 -0400
commitf206890c29c965f6ef422b318895e11c4039800a (patch)
treec40cf231b67f9b0887290a9a912c121cea1638b6 /linux/drivers/media/video/tda9887.c
parent4728a760179d2992de4fa160f0b1d474cb0c03d2 (diff)
downloadmediapointer-dvb-s2-f206890c29c965f6ef422b318895e11c4039800a.tar.gz
mediapointer-dvb-s2-f206890c29c965f6ef422b318895e11c4039800a.tar.bz2
make tda9887 build selectable via Kconfig
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/Kconfig | 10 +++++++++ linux/drivers/media/video/Makefile | 3 +- linux/drivers/media/video/tda9887.c | 23 ++++++++++++++------- linux/drivers/media/video/tda9887.h | 33 +++++++++++++++++++++++++++++++ linux/drivers/media/video/tuner-core.c | 3 +- linux/drivers/media/video/tuner-driver.h | 4 --- 6 files changed, 62 insertions(+), 14 deletions(-)
Diffstat (limited to 'linux/drivers/media/video/tda9887.c')
-rw-r--r--linux/drivers/media/video/tda9887.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index 1edb1299f..48a7de63e 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -13,7 +13,7 @@
#endif
#include <media/v4l2-common.h>
#include <media/tuner.h>
-#include "tuner-driver.h"
+#include "tda9887.h"
/* Chips:
@@ -24,13 +24,18 @@
Used as part of several tuners
*/
+static int tda9887_debug;
+module_param_named(debug, tda9887_debug, int, 0644);
+
#define tda9887_info(fmt, arg...) do {\
printk(KERN_INFO "%s %d-%04x: " fmt, priv->t->i2c.name, \
- i2c_adapter_id(priv->t->i2c.adapter), priv->t->i2c.addr , ##arg); } while (0)
+ i2c_adapter_id(priv->t->i2c.adapter), \
+ priv->t->i2c.addr, ##arg); } while (0)
#define tda9887_dbg(fmt, arg...) do {\
- if (tuner_debug) \
+ if (tda9887_debug) \
printk(KERN_INFO "%s %d-%04x: " fmt, priv->t->i2c.name, \
- i2c_adapter_id(priv->t->i2c.adapter), priv->t->i2c.addr , ##arg); } while (0)
+ i2c_adapter_id(priv->t->i2c.adapter), \
+ priv->t->i2c.addr, ##arg); } while (0)
struct tda9887_priv {
struct tuner_i2c_props i2c_props;
@@ -584,13 +589,13 @@ static void tda9887_configure(struct dvb_frontend *fe)
tda9887_dbg("writing: b=0x%02x c=0x%02x e=0x%02x\n",
priv->data[1],priv->data[2],priv->data[3]);
- if (tuner_debug > 1)
+ if (tda9887_debug > 1)
dump_write_message(fe, priv->data);
if (4 != (rc = tuner_i2c_xfer_send(&priv->i2c_props,priv->data,4)))
tda9887_info("i2c i/o error: rc == %d (should be 4)\n",rc);
- if (tuner_debug > 2) {
+ if (tda9887_debug > 2) {
msleep_interruptible(1000);
tda9887_status(fe);
}
@@ -601,7 +606,8 @@ static void tda9887_configure(struct dvb_frontend *fe)
static void tda9887_tuner_status(struct dvb_frontend *fe)
{
struct tda9887_priv *priv = fe->analog_demod_priv;
- tda9887_info("Data bytes: b=0x%02x c=0x%02x e=0x%02x\n", priv->data[1], priv->data[2], priv->data[3]);
+ tda9887_info("Data bytes: b=0x%02x c=0x%02x e=0x%02x\n",
+ priv->data[1], priv->data[2], priv->data[3]);
}
static int tda9887_get_afc(struct dvb_frontend *fe)
@@ -647,7 +653,7 @@ static struct analog_tuner_ops tda9887_tuner_ops = {
.release = tda9887_release,
};
-int tda9887_tuner_init(struct tuner *t)
+int tda9887_attach(struct tuner *t)
{
struct tda9887_priv *priv = NULL;
@@ -669,6 +675,7 @@ int tda9887_tuner_init(struct tuner *t)
return 0;
}
+EXPORT_SYMBOL_GPL(tda9887_attach);
/*
* Overrides for Emacs so that we follow Linus's tabbing style.