summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/sp887x.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/frontends/sp887x.c')
-rw-r--r--linux/drivers/media/dvb/frontends/sp887x.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/linux/drivers/media/dvb/frontends/sp887x.c b/linux/drivers/media/dvb/frontends/sp887x.c
index 1f53e09c3..06645548b 100644
--- a/linux/drivers/media/dvb/frontends/sp887x.c
+++ b/linux/drivers/media/dvb/frontends/sp887x.c
@@ -23,14 +23,17 @@
#include "dvb_frontend.h"
#include "dvb_functions.h"
-/* fixme: add this to i2c-id.h */
-#define I2C_DRIVERID_SP887X I2C_DRIVERID_EXP3
+#define FRONTEND_NAME "dvbfe_sp887x"
-#if 0
-#define dprintk(x...) printk(x)
-#else
-#define dprintk(x...)
-#endif
+#define dprintk(args...) \
+ do { \
+ if (debug) printk(KERN_DEBUG FRONTEND_NAME ": " args); \
+ } while (0)
+
+static int debug;
+
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
#if 0
#define LOG(dir,addr,buf,len) \
@@ -673,8 +676,8 @@ static int command (struct i2c_client *client, unsigned int cmd, void *arg)
static struct i2c_driver driver = {
.owner = THIS_MODULE,
- .name = "sp887x",
- .id = I2C_DRIVERID_SP887X,
+ .name = FRONTEND_NAME,
+ .id = I2C_DRIVERID_DVBFE_SP887X,
.flags = I2C_DF_NOTIFY,
.attach_adapter = attach_adapter,
.detach_client = detach_client,
@@ -682,7 +685,7 @@ static struct i2c_driver driver = {
};
static struct i2c_client client_template = {
- I2C_DEVNAME("sp887x"),
+ .name = FRONTEND_NAME,
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};