diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-01-11 16:01:01 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-11 17:26:13 -0500 |
commit | f9195ded25a4e8fba09c67aa24b42cd98a242d7d (patch) | |
tree | 61b4abb19b4ce4dc734b4a79fa90df241664b6f5 | |
parent | f167cb4e6ee07914b66eb85fc0bf006a409b6838 (diff) |
V4L/DVB (3347): 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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/mt20xx.c | 8 | ||||
-rw-r--r-- | drivers/media/video/tea5767.c | 4 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 16 | ||||
-rw-r--r-- | include/media/tuner.h | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/drivers/media/video/mt20xx.c b/drivers/media/video/mt20xx.c index 2c19c9588c02..0bf1caac5887 100644 --- a/drivers/media/video/mt20xx.c +++ b/drivers/media/video/mt20xx.c | |||
@@ -21,7 +21,7 @@ static unsigned int radio_antenna = 0; | |||
21 | module_param(radio_antenna, int, 0644); | 21 | module_param(radio_antenna, int, 0644); |
22 | 22 | ||
23 | /* from tuner-core.c */ | 23 | /* from tuner-core.c */ |
24 | extern int debug; | 24 | extern int tuner_debug; |
25 | 25 | ||
26 | /* ---------------------------------------------------------------------- */ | 26 | /* ---------------------------------------------------------------------- */ |
27 | 27 | ||
@@ -404,7 +404,7 @@ static void mt2050_set_if_freq(struct i2c_client *c,unsigned int freq, unsigned | |||
404 | div2a=(lo2/8)-1; | 404 | div2a=(lo2/8)-1; |
405 | div2b=lo2-(div2a+1)*8; | 405 | div2b=lo2-(div2a+1)*8; |
406 | 406 | ||
407 | if (debug > 1) { | 407 | if (tuner_debug > 1) { |
408 | tuner_dbg("lo1 lo2 = %d %d\n", lo1, lo2); | 408 | tuner_dbg("lo1 lo2 = %d %d\n", lo1, lo2); |
409 | tuner_dbg("num1 num2 div1a div1b div2a div2b= %x %x %x %x %x %x\n", | 409 | tuner_dbg("num1 num2 div1a div1b div2a div2b= %x %x %x %x %x %x\n", |
410 | num1,num2,div1a,div1b,div2a,div2b); | 410 | num1,num2,div1a,div1b,div2a,div2b); |
@@ -420,7 +420,7 @@ static void mt2050_set_if_freq(struct i2c_client *c,unsigned int freq, unsigned | |||
420 | buf[5]=div2a; | 420 | buf[5]=div2a; |
421 | if(num2!=0) buf[5]=buf[5]|0x40; | 421 | if(num2!=0) buf[5]=buf[5]|0x40; |
422 | 422 | ||
423 | if (debug > 1) { | 423 | if (tuner_debug > 1) { |
424 | int i; | 424 | int i; |
425 | tuner_dbg("bufs is: "); | 425 | tuner_dbg("bufs is: "); |
426 | for(i=0;i<6;i++) | 426 | for(i=0;i<6;i++) |
@@ -508,7 +508,7 @@ int microtune_init(struct i2c_client *c) | |||
508 | 508 | ||
509 | i2c_master_send(c,buf,1); | 509 | i2c_master_send(c,buf,1); |
510 | i2c_master_recv(c,buf,21); | 510 | i2c_master_recv(c,buf,21); |
511 | if (debug) { | 511 | if (tuner_debug) { |
512 | int i; | 512 | int i; |
513 | tuner_dbg("MT20xx hexdump:"); | 513 | tuner_dbg("MT20xx hexdump:"); |
514 | for(i=0;i<21;i++) { | 514 | for(i=0;i<21;i++) { |
diff --git a/drivers/media/video/tea5767.c b/drivers/media/video/tea5767.c index 261b7a3c0417..921fe72f23d5 100644 --- a/drivers/media/video/tea5767.c +++ b/drivers/media/video/tea5767.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #define PREFIX "TEA5767 " | 18 | #define PREFIX "TEA5767 " |
19 | 19 | ||
20 | /* from tuner-core.c */ | 20 | /* from tuner-core.c */ |
21 | extern int debug; | 21 | extern int tuner_debug; |
22 | 22 | ||
23 | /*****************************************************************************/ | 23 | /*****************************************************************************/ |
24 | 24 | ||
@@ -249,7 +249,7 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq) | |||
249 | if (5 != (rc = i2c_master_send(c, buffer, 5))) | 249 | if (5 != (rc = i2c_master_send(c, buffer, 5))) |
250 | tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc); | 250 | tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc); |
251 | 251 | ||
252 | if (debug) { | 252 | if (tuner_debug) { |
253 | if (5 != (rc = i2c_master_recv(c, buffer, 5))) | 253 | if (5 != (rc = i2c_master_recv(c, buffer, 5))) |
254 | tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc); | 254 | tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc); |
255 | else | 255 | else |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 89d013ce5edb..f30ef79d795e 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -41,8 +41,8 @@ static unsigned int no_autodetect = 0; | |||
41 | static unsigned int show_i2c = 0; | 41 | static unsigned int show_i2c = 0; |
42 | 42 | ||
43 | /* insmod options used at runtime => read/write */ | 43 | /* insmod options used at runtime => read/write */ |
44 | static unsigned int tuner_debug = 0; | 44 | static unsigned int tuner_debug_old = 0; |
45 | int debug = 0; | 45 | int tuner_debug = 0; |
46 | 46 | ||
47 | static unsigned int tv_range[2] = { 44, 958 }; | 47 | static unsigned int tv_range[2] = { 44, 958 }; |
48 | static unsigned int radio_range[2] = { 65, 108 }; | 48 | static unsigned int radio_range[2] = { 65, 108 }; |
@@ -51,13 +51,13 @@ static char pal[] = "--"; | |||
51 | static char secam[] = "--"; | 51 | static char secam[] = "--"; |
52 | static char ntsc[] = "-"; | 52 | static char ntsc[] = "-"; |
53 | 53 | ||
54 | |||
54 | module_param(addr, int, 0444); | 55 | module_param(addr, int, 0444); |
55 | module_param(no_autodetect, int, 0444); | 56 | module_param(no_autodetect, int, 0444); |
56 | module_param(show_i2c, int, 0444); | 57 | module_param(show_i2c, int, 0444); |
57 | /* Note: tuner_debug is deprecated and will be removed in 2.6.17 */ | 58 | /* Note: tuner_debug is deprecated and will be removed in 2.6.17 */ |
58 | module_param(tuner_debug, int, 0444); | 59 | module_param_named(tuner_debug,tuner_debug_old, int, 0444); |
59 | module_param(debug, int, 0644); | 60 | module_param_named(debug,tuner_debug, int, 0644); |
60 | |||
61 | module_param_string(pal, pal, sizeof(pal), 0644); | 61 | module_param_string(pal, pal, sizeof(pal), 0644); |
62 | module_param_string(secam, secam, sizeof(secam), 0644); | 62 | module_param_string(secam, secam, sizeof(secam), 0644); |
63 | module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); | 63 | module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); |
@@ -419,8 +419,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) | |||
419 | t->radio_if2 = 10700 * 1000; /* 10.7MHz - FM radio */ | 419 | t->radio_if2 = 10700 * 1000; /* 10.7MHz - FM radio */ |
420 | t->audmode = V4L2_TUNER_MODE_STEREO; | 420 | t->audmode = V4L2_TUNER_MODE_STEREO; |
421 | t->mode_mask = T_UNINITIALIZED; | 421 | t->mode_mask = T_UNINITIALIZED; |
422 | if (tuner_debug) { | 422 | if (tuner_debug_old) { |
423 | debug = tuner_debug; | 423 | tuner_debug = tuner_debug_old; |
424 | printk(KERN_ERR "tuner: tuner_debug is deprecated and will be removed in 2.6.17.\n"); | 424 | printk(KERN_ERR "tuner: tuner_debug is deprecated and will be removed in 2.6.17.\n"); |
425 | printk(KERN_ERR "tuner: use the debug option instead.\n"); | 425 | printk(KERN_ERR "tuner: use the debug option instead.\n"); |
426 | } | 426 | } |
@@ -551,7 +551,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
551 | { | 551 | { |
552 | struct tuner *t = i2c_get_clientdata(client); | 552 | struct tuner *t = i2c_get_clientdata(client); |
553 | 553 | ||
554 | if (debug>1) | 554 | if (tuner_debug>1) |
555 | v4l_i2c_print_ioctl(&(t->i2c),cmd); | 555 | v4l_i2c_print_ioctl(&(t->i2c),cmd); |
556 | 556 | ||
557 | switch (cmd) { | 557 | switch (cmd) { |
diff --git a/include/media/tuner.h b/include/media/tuner.h index 7674b121ce8b..27cbf08c931d 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -218,8 +218,8 @@ extern int tea5767_autodetection(struct i2c_client *c); | |||
218 | printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ | 218 | printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ |
219 | i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) | 219 | i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) |
220 | #define tuner_dbg(fmt, arg...) do {\ | 220 | #define tuner_dbg(fmt, arg...) do {\ |
221 | extern int debug; \ | 221 | extern int tuner_debug; \ |
222 | if (debug) \ | 222 | if (tuner_debug) \ |
223 | printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ | 223 | printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ |
224 | i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) | 224 | i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) |
225 | 225 | ||