diff options
| author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-11 16:41:49 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-11 16:41:49 -0500 |
| commit | f167cb4e6ee07914b66eb85fc0bf006a409b6838 (patch) | |
| tree | 11b888db404a404a9a918c841d06d65c21bc4c19 | |
| parent | b2a17e47ceb82d23dbf5c5fb24b5377e21486dce (diff) | |
V4L/DVB (3345): Fixes some bad global variables
- Debug global var is already used inside kernel.
- v4l_dbg now expects the debug var
- global vars inside msp34xx renamed to msp_*
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
| -rw-r--r-- | drivers/media/video/bt832.c | 4 | ||||
| -rw-r--r-- | drivers/media/video/cs53l32a.c | 4 | ||||
| -rw-r--r-- | drivers/media/video/cx25840/cx25840-core.c | 12 | ||||
| -rw-r--r-- | drivers/media/video/msp3400-driver.c | 64 | ||||
| -rw-r--r-- | drivers/media/video/msp3400-kthreads.c | 124 | ||||
| -rw-r--r-- | drivers/media/video/msp3400.h | 12 | ||||
| -rw-r--r-- | drivers/media/video/saa7115.c | 38 | ||||
| -rw-r--r-- | drivers/media/video/saa7127.c | 36 | ||||
| -rw-r--r-- | drivers/media/video/tda7432.c | 12 | ||||
| -rw-r--r-- | drivers/media/video/tvaudio.c | 52 | ||||
| -rw-r--r-- | include/media/v4l2-common.h | 3 |
11 files changed, 180 insertions, 181 deletions
diff --git a/drivers/media/video/bt832.c b/drivers/media/video/bt832.c index 361a9b6ccc..07c78f1f7a 100644 --- a/drivers/media/video/bt832.c +++ b/drivers/media/video/bt832.c | |||
| @@ -75,13 +75,13 @@ int bt832_hexdump(struct i2c_client *i2c_client_s, unsigned char *buf) | |||
| 75 | 75 | ||
| 76 | if(debug>1) { | 76 | if(debug>1) { |
| 77 | int i; | 77 | int i; |
| 78 | v4l_dbg(2,i2c_client_s,"hexdump:"); | 78 | v4l_dbg(2, debug,i2c_client_s,"hexdump:"); |
| 79 | for(i=1;i<65;i++) { | 79 | for(i=1;i<65;i++) { |
| 80 | if(i!=1) { | 80 | if(i!=1) { |
| 81 | if(((i-1)%8)==0) printk(" "); | 81 | if(((i-1)%8)==0) printk(" "); |
| 82 | if(((i-1)%16)==0) { | 82 | if(((i-1)%16)==0) { |
| 83 | printk("\n"); | 83 | printk("\n"); |
| 84 | v4l_dbg(2,i2c_client_s,"hexdump:"); | 84 | v4l_dbg(2, debug,i2c_client_s,"hexdump:"); |
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| 87 | printk(" %02x",buf[i]); | 87 | printk(" %02x",buf[i]); |
diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/video/cs53l32a.c index 9a66b5961d..8739c64785 100644 --- a/drivers/media/video/cs53l32a.c +++ b/drivers/media/video/cs53l32a.c | |||
| @@ -155,7 +155,7 @@ static int cs53l32a_attach(struct i2c_adapter *adapter, int address, int kind) | |||
| 155 | for (i = 1; i <= 7; i++) { | 155 | for (i = 1; i <= 7; i++) { |
| 156 | u8 v = cs53l32a_read(client, i); | 156 | u8 v = cs53l32a_read(client, i); |
| 157 | 157 | ||
| 158 | v4l_dbg(1, client, "Read Reg %d %02x\n", i, v); | 158 | v4l_dbg(1, debug, client, "Read Reg %d %02x\n", i, v); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | /* Set cs53l32a internal register for Adaptec 2010/2410 setup */ | 161 | /* Set cs53l32a internal register for Adaptec 2010/2410 setup */ |
| @@ -173,7 +173,7 @@ static int cs53l32a_attach(struct i2c_adapter *adapter, int address, int kind) | |||
| 173 | for (i = 1; i <= 7; i++) { | 173 | for (i = 1; i <= 7; i++) { |
| 174 | u8 v = cs53l32a_read(client, i); | 174 | u8 v = cs53l32a_read(client, i); |
| 175 | 175 | ||
| 176 | v4l_dbg(1, client, "Read Reg %d %02x\n", i, v); | 176 | v4l_dbg(1, debug, client, "Read Reg %d %02x\n", i, v); |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | i2c_attach_client(client); | 179 | i2c_attach_client(client); |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index c173476243..847b166d8b 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
| @@ -265,7 +265,7 @@ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_inp | |||
| 265 | vid_input <= CX25840_COMPOSITE8); | 265 | vid_input <= CX25840_COMPOSITE8); |
| 266 | u8 reg; | 266 | u8 reg; |
| 267 | 267 | ||
| 268 | v4l_dbg(1, client, "decoder set video input %d, audio input %d\n", | 268 | v4l_dbg(1, debug, client, "decoder set video input %d, audio input %d\n", |
| 269 | vid_input, aud_input); | 269 | vid_input, aud_input); |
| 270 | 270 | ||
| 271 | if (is_composite) { | 271 | if (is_composite) { |
| @@ -533,7 +533,7 @@ static int set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt) | |||
| 533 | else | 533 | else |
| 534 | filter = 3; | 534 | filter = 3; |
| 535 | 535 | ||
| 536 | v4l_dbg(1, client, "decoder set size %dx%d -> scale %ux%u\n", | 536 | v4l_dbg(1, debug, client, "decoder set size %dx%d -> scale %ux%u\n", |
| 537 | pix->width, pix->height, HSC, VSC); | 537 | pix->width, pix->height, HSC, VSC); |
| 538 | 538 | ||
| 539 | /* HSCALE=HSC */ | 539 | /* HSCALE=HSC */ |
| @@ -687,13 +687,13 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, | |||
| 687 | return cx25840_audio(client, cmd, arg); | 687 | return cx25840_audio(client, cmd, arg); |
| 688 | 688 | ||
| 689 | case VIDIOC_STREAMON: | 689 | case VIDIOC_STREAMON: |
| 690 | v4l_dbg(1, client, "enable output\n"); | 690 | v4l_dbg(1, debug, client, "enable output\n"); |
| 691 | cx25840_write(client, 0x115, 0x8c); | 691 | cx25840_write(client, 0x115, 0x8c); |
| 692 | cx25840_write(client, 0x116, 0x07); | 692 | cx25840_write(client, 0x116, 0x07); |
| 693 | break; | 693 | break; |
| 694 | 694 | ||
| 695 | case VIDIOC_STREAMOFF: | 695 | case VIDIOC_STREAMOFF: |
| 696 | v4l_dbg(1, client, "disable output\n"); | 696 | v4l_dbg(1, debug, client, "disable output\n"); |
| 697 | cx25840_write(client, 0x115, 0x00); | 697 | cx25840_write(client, 0x115, 0x00); |
| 698 | cx25840_write(client, 0x116, 0x00); | 698 | cx25840_write(client, 0x116, 0x00); |
| 699 | break; | 699 | break; |
| @@ -871,7 +871,7 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, | |||
| 871 | client->driver = &i2c_driver_cx25840; | 871 | client->driver = &i2c_driver_cx25840; |
| 872 | snprintf(client->name, sizeof(client->name) - 1, "cx25840"); | 872 | snprintf(client->name, sizeof(client->name) - 1, "cx25840"); |
| 873 | 873 | ||
| 874 | v4l_dbg(1, client, "detecting cx25840 client on address 0x%x\n", address << 1); | 874 | v4l_dbg(1, debug, client, "detecting cx25840 client on address 0x%x\n", address << 1); |
| 875 | 875 | ||
| 876 | device_id = cx25840_read(client, 0x101) << 8; | 876 | device_id = cx25840_read(client, 0x101) << 8; |
| 877 | device_id |= cx25840_read(client, 0x100); | 877 | device_id |= cx25840_read(client, 0x100); |
| @@ -879,7 +879,7 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, | |||
| 879 | /* The high byte of the device ID should be | 879 | /* The high byte of the device ID should be |
| 880 | * 0x84 if chip is present */ | 880 | * 0x84 if chip is present */ |
| 881 | if ((device_id & 0xff00) != 0x8400) { | 881 | if ((device_id & 0xff00) != 0x8400) { |
| 882 | v4l_dbg(1, client, "cx25840 not found\n"); | 882 | v4l_dbg(1, debug, client, "cx25840 not found\n"); |
| 883 | kfree(client); | 883 | kfree(client); |
| 884 | return 0; | 884 | return 0; |
| 885 | } | 885 | } |
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index aa8c556b6b..9b05a0ab77 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
| @@ -66,26 +66,26 @@ MODULE_LICENSE("GPL"); | |||
| 66 | 66 | ||
| 67 | /* module parameters */ | 67 | /* module parameters */ |
| 68 | static int opmode = OPMODE_AUTO; | 68 | static int opmode = OPMODE_AUTO; |
| 69 | int debug = 0; /* debug output */ | 69 | int msp_debug = 0; /* msp_debug output */ |
| 70 | int once = 0; /* no continous stereo monitoring */ | 70 | int msp_once = 0; /* no continous stereo monitoring */ |
| 71 | int amsound = 0; /* hard-wire AM sound at 6.5 Hz (france), | 71 | int msp_amsound = 0; /* hard-wire AM sound at 6.5 Hz (france), |
| 72 | the autoscan seems work well only with FM... */ | 72 | the autoscan seems work well only with FM... */ |
| 73 | int standard = 1; /* Override auto detect of audio standard, if needed. */ | 73 | int msp_standard = 1; /* Override auto detect of audio msp_standard, if needed. */ |
| 74 | int dolby = 0; | 74 | int msp_dolby = 0; |
| 75 | 75 | ||
| 76 | int stereo_threshold = 0x190; /* a2 threshold for stereo/bilingual | 76 | int msp_stereo_thresh = 0x190; /* a2 threshold for stereo/bilingual |
| 77 | (msp34xxg only) 0x00a0-0x03c0 */ | 77 | (msp34xxg only) 0x00a0-0x03c0 */ |
| 78 | 78 | ||
| 79 | /* read-only */ | 79 | /* read-only */ |
| 80 | module_param(opmode, int, 0444); | 80 | module_param(opmode, int, 0444); |
| 81 | 81 | ||
| 82 | /* read-write */ | 82 | /* read-write */ |
| 83 | module_param(once, bool, 0644); | 83 | module_param_named(once,msp_once, bool, 0644); |
| 84 | module_param(debug, int, 0644); | 84 | module_param_named(debug,msp_debug, int, 0644); |
| 85 | module_param(stereo_threshold, int, 0644); | 85 | module_param_named(stereo_threshold,msp_stereo_thresh, int, 0644); |
| 86 | module_param(standard, int, 0644); | 86 | module_param_named(standard,msp_standard, int, 0644); |
| 87 | module_param(amsound, bool, 0644); | 87 | module_param_named(amsound,msp_amsound, bool, 0644); |
| 88 | module_param(dolby, bool, 0644); | 88 | module_param_named(dolby,msp_dolby, bool, 0644); |
| 89 | 89 | ||
| 90 | MODULE_PARM_DESC(opmode, "Forces a MSP3400 opmode. 0=Manual, 1=Autodetect, 2=Autodetect and autoselect"); | 90 | MODULE_PARM_DESC(opmode, "Forces a MSP3400 opmode. 0=Manual, 1=Autodetect, 2=Autodetect and autoselect"); |
| 91 | MODULE_PARM_DESC(once, "No continuous stereo monitoring"); | 91 | MODULE_PARM_DESC(once, "No continuous stereo monitoring"); |
| @@ -127,7 +127,7 @@ int msp_reset(struct i2c_client *client) | |||
| 127 | { client->addr, I2C_M_RD, 2, read }, | 127 | { client->addr, I2C_M_RD, 2, read }, |
| 128 | }; | 128 | }; |
| 129 | 129 | ||
| 130 | v4l_dbg(3, client, "msp_reset\n"); | 130 | v4l_dbg(3, msp_debug, client, "msp_reset\n"); |
| 131 | if (i2c_transfer(client->adapter, &reset[0], 1) != 1 || | 131 | if (i2c_transfer(client->adapter, &reset[0], 1) != 1 || |
| 132 | i2c_transfer(client->adapter, &reset[1], 1) != 1 || | 132 | i2c_transfer(client->adapter, &reset[1], 1) != 1 || |
| 133 | i2c_transfer(client->adapter, test, 2) != 2) { | 133 | i2c_transfer(client->adapter, test, 2) != 2) { |
| @@ -165,7 +165,7 @@ static int msp_read(struct i2c_client *client, int dev, int addr) | |||
| 165 | return -1; | 165 | return -1; |
| 166 | } | 166 | } |
| 167 | retval = read[0] << 8 | read[1]; | 167 | retval = read[0] << 8 | read[1]; |
| 168 | v4l_dbg(3, client, "msp_read(0x%x, 0x%x): 0x%x\n", dev, addr, retval); | 168 | v4l_dbg(3, msp_debug, client, "msp_read(0x%x, 0x%x): 0x%x\n", dev, addr, retval); |
| 169 | return retval; | 169 | return retval; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| @@ -190,7 +190,7 @@ static int msp_write(struct i2c_client *client, int dev, int addr, int val) | |||
| 190 | buffer[3] = val >> 8; | ||
