diff options
author | Hans Verkuil <devnull@localhost> | 2006-01-11 21:01:01 +0000 |
---|---|---|
committer | Hans Verkuil <devnull@localhost> | 2006-01-11 21:01:01 +0000 |
commit | 9985093e2b4f19b1d13d5004346f22540c92cc5d (patch) | |
tree | 12183d0a027579a81106fbfd7f1a7f92bd7451fd /linux | |
parent | 069637ed9609cb009c57d2bf1039e69812b2304b (diff) | |
download | mediapointer-dvb-s2-9985093e2b4f19b1d13d5004346f22540c92cc5d.tar.gz mediapointer-dvb-s2-9985093e2b4f19b1d13d5004346f22540c92cc5d.tar.bz2 |
Fixes some bad global variables
- debug global var is already used inside kernel, so renamed
debug to tuner_debug for the tuner module
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/mt20xx.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/video/tea5761.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/tea5767.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 29 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-simple.c | 6 | ||||
-rw-r--r-- | linux/include/media/tuner.h | 10 |
6 files changed, 38 insertions, 29 deletions
diff --git a/linux/drivers/media/video/mt20xx.c b/linux/drivers/media/video/mt20xx.c index 5a0c44703..fda706d86 100644 --- a/linux/drivers/media/video/mt20xx.c +++ b/linux/drivers/media/video/mt20xx.c @@ -1,5 +1,5 @@ /* - * $Id: mt20xx.c,v 1.13 2006/01/02 22:31:44 hverkuil Exp $ + * $Id: mt20xx.c,v 1.14 2006/01/11 21:01:01 hverkuil Exp $ * * i2c tv tuner chip device driver * controls microtune tuners, mt2032 + mt2050 at the moment. @@ -26,7 +26,7 @@ static unsigned int radio_antenna = 0; module_param(radio_antenna, int, 0644); /* from tuner-core.c */ -extern int debug; +extern int tuner_debug; /* ---------------------------------------------------------------------- */ @@ -409,7 +409,7 @@ static void mt2050_set_if_freq(struct i2c_client *c,unsigned int freq, unsigned div2a=(lo2/8)-1; div2b=lo2-(div2a+1)*8; - if (debug > 1) { + if (tuner_debug > 1) { tuner_dbg("lo1 lo2 = %d %d\n", lo1, lo2); tuner_dbg("num1 num2 div1a div1b div2a div2b= %x %x %x %x %x %x\n", num1,num2,div1a,div1b,div2a,div2b); @@ -425,7 +425,7 @@ static void mt2050_set_if_freq(struct i2c_client *c,unsigned int freq, unsigned buf[5]=div2a; if(num2!=0) buf[5]=buf[5]|0x40; - if (debug > 1) { + if (tuner_debug > 1) { int i; tuner_dbg("bufs is: "); for(i=0;i<6;i++) @@ -513,7 +513,7 @@ int microtune_init(struct i2c_client *c) i2c_master_send(c,buf,1); i2c_master_recv(c,buf,21); - if (debug) { + if (tuner_debug) { int i; tuner_dbg("MT20xx hexdump:"); for(i=0;i<21;i++) { diff --git a/linux/drivers/media/video/tea5761.c b/linux/drivers/media/video/tea5761.c index 5a588ee56..785cd105d 100644 --- a/linux/drivers/media/video/tea5761.c +++ b/linux/drivers/media/video/tea5761.c @@ -2,7 +2,7 @@ * For Philips TEA5761 FM Chip * I2C address is allways 0x20 (0x10 at 7-bit mode). * - * $Id: tea5761.c,v 1.4 2006/01/02 22:31:44 hverkuil Exp $ + * $Id: tea5761.c,v 1.5 2006/01/11 21:01:01 hverkuil Exp $ * * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) * This code is placed under the terms of the GNU General Public License @@ -19,7 +19,7 @@ #define PREFIX "TEA5761 " /* from tuner-core.c */ -extern int debug; +extern int tuner_debug; /*****************************************************************************/ @@ -167,7 +167,7 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq) buffer[1] = (div >> 8) & 0x3f; buffer[2] = div & 0xff; - if (debug) + if (tuner_debug) tea5761_status_dump(buffer); if (7 != (rc = i2c_master_send(c, buffer, 7))) diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c index 9d3320fea..d3a75aa88 100644 --- a/linux/drivers/media/video/tea5767.c +++ b/linux/drivers/media/video/tea5767.c @@ -2,7 +2,7 @@ * For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview * I2C address is allways 0xC0. * - * $Id: tea5767.c,v 1.34 2006/01/02 22:31:44 hverkuil Exp $ + * $Id: tea5767.c,v 1.35 2006/01/11 21:01:01 hverkuil Exp $ * * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) * This code is placed under the terms of the GNU General Public License @@ -23,7 +23,7 @@ #define PREFIX "TEA5767 " /* from tuner-core.c */ -extern int debug; +extern int tuner_debug; /*****************************************************************************/ @@ -254,7 +254,7 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq) if (5 != (rc = i2c_master_send(c, buffer, 5))) tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc); - if (debug) { + if (tuner_debug) { if (5 != (rc = i2c_master_recv(c, buffer, 5))) tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc); else diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 0e4e7752a..5b9cb9b7e 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-core.c,v 1.97 2006/01/11 19:28:02 mchehab Exp $ + * $Id: tuner-core.c,v 1.98 2006/01/11 21:01:01 hverkuil Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -49,8 +49,8 @@ static unsigned int no_autodetect = 0; static unsigned int show_i2c = 0; /* insmod options used at runtime => read/write */ -static unsigned int tuner_debug = 0; -int debug = 0; +static unsigned int tuner_debug_old = 0; +int tuner_debug = 0; static unsigned int tv_range[2] = { 44, 958 }; static unsigned int radio_range[2] = { 65, 108 }; @@ -59,12 +59,6 @@ static char pal[] = "--"; static char secam[] = "--"; static char ntsc[] = "-"; -module_param(addr, int, 0444); -module_param(no_autodetect, int, 0444); -module_param(show_i2c, int, 0444); -/* Note: tuner_debug is deprecated and will be removed in 2.6.17 */ -module_param(tuner_debug, int, 0444); -module_param(debug, int, 0644); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) MODULE_PARM(pal,"s"); @@ -72,7 +66,18 @@ MODULE_PARM(secam,"s"); MODULE_PARM(ntsc,"s"); MODULE_PARM(tv_range,"2i"); MODULE_PARM(radio_range,"2i"); +MODULE_PARM(no_autodetect, "i"); +MODULE_PARM(tuner_debug, "i"); +MODULE_PARM(tuner_debug_old, "i"); +MODULE_PARM(addr, "i"); +MODULE_PARM(show_i2c, "i"); #else +module_param(addr, int, 0444); +module_param(no_autodetect, int, 0444); +module_param(show_i2c, int, 0444); +/* Note: tuner_debug is deprecated and will be removed in 2.6.17 */ +module_param_named(tuner_debug,tuner_debug_old, int, 0444); +module_param_named(debug,tuner_debug, int, 0644); module_param_string(pal, pal, sizeof(pal), 0644); module_param_string(secam, secam, sizeof(secam), 0644); module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); @@ -455,8 +460,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, t->radio_if2 = 10700 * 1000; /* 10.7MHz - FM radio */ t->audmode = V4L2_TUNER_MODE_STEREO; t->mode_mask = T_UNINITIALIZED; - if (tuner_debug) { - debug = tuner_debug; + if (tuner_debug_old) { + tuner_debug = tuner_debug_old; printk(KERN_ERR "tuner: tuner_debug is deprecated and will be removed in 2.6.17.\n"); printk(KERN_ERR "tuner: use the debug option instead.\n"); } @@ -598,7 +603,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct tuner *t = i2c_get_clientdata(client); - if (debug>1) + if (tuner_debug>1) v4l_i2c_print_ioctl(&(t->i2c),cmd); switch (cmd) { diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index 5fe834ebb..3ce51f193 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-simple.c,v 1.68 2005/12/27 04:30:20 mkrufky Exp $ + * $Id: tuner-simple.c,v 1.69 2006/01/11 21:01:01 hverkuil Exp $ * * i2c tv tuner chip device driver * controls all those simple 4-control-bytes style tuners. @@ -15,7 +15,11 @@ #endif static int offset = 0; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +MODULE_PARM(offset, "i"); +#else module_param(offset, int, 0666); +#endif MODULE_PARM_DESC(offset,"Allows to specify an offset for tuner"); /* ---------------------------------------------------------------------- */ diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h index f62c95152..12cf1f808 100644 --- a/linux/include/media/tuner.h +++ b/linux/include/media/tuner.h @@ -1,5 +1,5 @@ /* - $Id: tuner.h,v 1.72 2006/01/08 12:05:34 mchehab Exp $ + $Id: tuner.h,v 1.73 2006/01/11 21:01:01 hverkuil Exp $ tuner.h - definition for different tuners Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de) @@ -220,8 +220,8 @@ extern int tea5767_autodetection(struct i2c_client *c); printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->name, \ i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) #define tuner_dbg(fmt, arg...) do {\ - extern int debug; \ - if (debug) \ + extern int tuner_debug; \ + if (tuner_debug) \ printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \ i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) #else @@ -232,8 +232,8 @@ extern int tea5767_autodetection(struct i2c_client *c); printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) #define tuner_dbg(fmt, arg...) do {\ - extern int debug; \ - if (debug) \ + extern int tuner_debug; \ + if (tuner_debug) \ printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) #endif |