diff options
Diffstat (limited to 'linux/drivers/media/dvb/frontends/tda1004x.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda1004x.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda1004x.c b/linux/drivers/media/dvb/frontends/tda1004x.c index 1368cceaa..3f9103650 100644 --- a/linux/drivers/media/dvb/frontends/tda1004x.c +++ b/linux/drivers/media/dvb/frontends/tda1004x.c @@ -39,13 +39,20 @@ #include <linux/device.h> #include <linux/firmware.h> -/* fixme: add this to i2c-id.h */ -#define I2C_DRIVERID_TDA1004X I2C_DRIVERID_EXP2 - #include "dvb_frontend.h" #include "dvb_functions.h" -static int tda1004x_debug = 0; +#define FRONTEND_NAME "dvbfe_tda1004x" + +#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)."); #define MC44BC374_ADDRESS 0x65 @@ -133,8 +140,6 @@ static int tda1004x_debug = 0; #define TUNER_TYPE_TD1344 0 #define TUNER_TYPE_TD1316 1 -#define dprintk if (tda1004x_debug) printk - static struct dvb_frontend_info tda10045h_info = { .name = "Philips TDA10045H", .type = FE_OFDM, @@ -1572,8 +1577,8 @@ static int command (struct i2c_client *client, unsigned int cmd, void *arg) static struct i2c_driver driver = { .owner = THIS_MODULE, - .name = "tda1004x", - .id = I2C_DRIVERID_TDA1004X, + .name = FRONTEND_NAME, + .id = I2C_DRIVERID_DVBFE_TDA1004X, .flags = I2C_DF_NOTIFY, .attach_adapter = attach_adapter, .detach_client = detach_client, @@ -1581,7 +1586,7 @@ static struct i2c_driver driver = { }; static struct i2c_client client_template = { - I2C_DEVNAME("tda1004x"), + .name = FRONTEND_NAME, .flags = I2C_CLIENT_ALLOW_USE, .driver = &driver, }; @@ -1604,5 +1609,3 @@ MODULE_DESCRIPTION("Philips TDA10045H & TDA10046H DVB-T Frontend"); MODULE_AUTHOR("Andrew de Quincey & Robert Schlabbach"); MODULE_LICENSE("GPL"); -MODULE_PARM(tda1004x_debug, "i"); -MODULE_PARM_DESC(tda1004x_debug, "enable verbose debug messages"); |