diff options
author | Kenneth Aafloy <devnull@localhost> | 2004-07-16 14:46:29 +0000 |
---|---|---|
committer | Kenneth Aafloy <devnull@localhost> | 2004-07-16 14:46:29 +0000 |
commit | f1f25e77af737129e46568e8a1013b8d8988143b (patch) | |
tree | 40b9ceac04e41b5e3f93af1f583eb8d4c376b900 /linux/drivers/media/dvb/frontends/stv0299.c | |
parent | a43144ada64f80f38143344df0e2fc3f9249570f (diff) | |
download | mediapointer-dvb-s2-f1f25e77af737129e46568e8a1013b8d8988143b.tar.gz mediapointer-dvb-s2-f1f25e77af737129e46568e8a1013b8d8988143b.tar.bz2 |
- Adding I2C_DRIVERID for all frontends to dvb_i2c.h
- dvb_dummy_fe conversion to Kernel I2C
- Conversion from deprecated MODULE_PARM* to module_param*
- Adding/renaming existing *debug* parameter to debug.
- Common naming scheme for debug/I2C: dvbfe_*
Diffstat (limited to 'linux/drivers/media/dvb/frontends/stv0299.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/stv0299.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c index e4cd9a351..bc8d13ea2 100644 --- a/linux/drivers/media/dvb/frontends/stv0299.c +++ b/linux/drivers/media/dvb/frontends/stv0299.c @@ -55,16 +55,21 @@ #include "dvb_frontend.h" #include "dvb_functions.h" -/* fixme: add this to i2c-id.h */ -#define I2C_DRIVERID_STV0299 I2C_DRIVERID_EXP0 +#define FRONTEND_NAME "dvbfe_stv0299" -#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 stv0299_status = 0; +static int debug; +static int stv0299_status; + +module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); +module_param(stv0299_status, int, 0444); +MODULE_PARM_DESC(stv0299_status, "Which status value to support " + "(0 == BER (default), 1 == UCBLOCKS)"); #define STATUS_BER 0 #define STATUS_UCBLOCKS 1 @@ -1440,8 +1445,8 @@ static int command (struct i2c_client *client, unsigned int cmd, void *arg) static struct i2c_driver driver = { .owner = THIS_MODULE, - .name = "stv0299", - .id = I2C_DRIVERID_STV0299, + .name = FRONTEND_NAME, + .id = I2C_DRIVERID_DVBFE_STV0299, .flags = I2C_DF_NOTIFY, .attach_adapter = attach_adapter, .detach_client = detach_client, @@ -1449,7 +1454,7 @@ static struct i2c_driver driver = { }; static struct i2c_client client_template = { - I2C_DEVNAME("stv0299"), + .name = FRONTEND_NAME, .flags = I2C_CLIENT_ALLOW_USE, .driver = &driver, }; @@ -1473,6 +1478,3 @@ MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, " "Andreas Oberritter, Andrew de Quincey, Kenneth Aafløy"); MODULE_LICENSE("GPL"); -MODULE_PARM(stv0299_status, "i"); -MODULE_PARM_DESC(stv0299_status, "Which status value to support (0: BER, 1: UCBLOCKS)"); - |