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 /drivers/media/video/saa7115.c | |
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>
Diffstat (limited to 'drivers/media/video/saa7115.c')
-rw-r--r-- | drivers/media/video/saa7115.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index ab8b4bcb5dd..048d000941c 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -549,7 +549,7 @@ static int saa7115_set_audio_clock_freq(struct i2c_client *client, u32 freq) | |||
549 | u32 hz; | 549 | u32 hz; |
550 | u64 f; | 550 | u64 f; |
551 | 551 | ||
552 | v4l_dbg(1, client, "set audio clock freq: %d\n", freq); | 552 | v4l_dbg(1, debug, client, "set audio clock freq: %d\n", freq); |
553 | 553 | ||
554 | /* sanity check */ | 554 | /* sanity check */ |
555 | if (freq < 32000 || freq > 48000) | 555 | if (freq < 32000 || freq > 48000) |
@@ -670,10 +670,10 @@ static void saa7115_set_v4lstd(struct i2c_client *client, v4l2_std_id std) | |||
670 | 670 | ||
671 | // This works for NTSC-M, SECAM-L and the 50Hz PAL variants. | 671 | // This works for NTSC-M, SECAM-L and the 50Hz PAL variants. |
672 | if (std & V4L2_STD_525_60) { | 672 | if (std & V4L2_STD_525_60) { |
673 | v4l_dbg(1, client, "decoder set standard 60 Hz\n"); | 673 | v4l_dbg(1, debug, client, "decoder set standard 60 Hz\n"); |
674 | saa7115_writeregs(client, saa7115_cfg_60hz_video); | 674 | saa7115_writeregs(client, saa7115_cfg_60hz_video); |
675 | } else { | 675 | } else { |
676 | v4l_dbg(1, client, "decoder set standard 50 Hz\n"); | 676 | v4l_dbg(1, debug, client, "decoder set standard 50 Hz\n"); |
677 | saa7115_writeregs(client, saa7115_cfg_50hz_video); | 677 | saa7115_writeregs(client, saa7115_cfg_50hz_video); |
678 | } | 678 | } |
679 | 679 | ||
@@ -863,7 +863,7 @@ static int saa7115_set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt | |||
863 | 863 | ||
864 | pix = &(fmt->fmt.pix); | 864 | pix = &(fmt->fmt.pix); |
865 | 865 | ||
866 | v4l_dbg(1, client, "decoder set size\n"); | 866 | v4l_dbg(1, debug, client, "decoder set size\n"); |
867 | 867 | ||
868 | /* FIXME need better bounds checking here */ | 868 | /* FIXME need better bounds checking here */ |
869 | if ((pix->width < 1) || (pix->width > 1440)) | 869 | if ((pix->width < 1) || (pix->width > 1440)) |
@@ -889,7 +889,7 @@ static int saa7115_set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt | |||
889 | HPSC = HPSC ? HPSC : 1; | 889 | HPSC = HPSC ? HPSC : 1; |
890 | HFSC = (int)((1024 * 720) / (HPSC * pix->width)); | 890 | HFSC = (int)((1024 * 720) / (HPSC * pix->width)); |
891 | 891 | ||
892 | v4l_dbg(1, client, "Hpsc: 0x%05x, Hfsc: 0x%05x\n", HPSC, HFSC); | 892 | v4l_dbg(1, debug, client, "Hpsc: 0x%05x, Hfsc: 0x%05x\n", HPSC, HFSC); |
893 | /* FIXME hardcodes to "Task B" | 893 | /* FIXME hardcodes to "Task B" |
894 | * write H prescaler integer */ | 894 | * write H prescaler integer */ |
895 | saa7115_write(client, 0xd0, (u8) (HPSC & 0x3f)); | 895 | saa7115_write(client, 0xd0, (u8) (HPSC & 0x3f)); |
@@ -903,10 +903,10 @@ static int saa7115_set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt | |||
903 | saa7115_write(client, 0xDD, (u8) ((HFSC >> 9) & 0xff)); | 903 | saa7115_write(client, 0xDD, (u8) ((HFSC >> 9) & 0xff)); |
904 | } else { | 904 | } else { |
905 | if (is_50hz) { | 905 | if (is_50hz) { |
906 | v4l_dbg(1, client, "Setting full 50hz width\n"); | 906 | v4l_dbg(1, debug, client, "Setting full 50hz width\n"); |
907 | saa7115_writeregs(client, saa7115_cfg_50hz_fullres_x); | 907 | saa7115_writeregs(client, saa7115_cfg_50hz_fullres_x); |
908 | } else { | 908 | } else { |
909 | v4l_dbg(1, client, "Setting full 60hz width\n"); | 909 | v4l_dbg(1, debug, client, "Setting full 60hz width\n"); |
910 | saa7115_writeregs(client, saa7115_cfg_60hz_fullres_x); | 910 | saa7115_writeregs(client, saa7115_cfg_60hz_fullres_x); |
911 | } | 911 | } |
912 | } | 912 | } |
@@ -915,7 +915,7 @@ static int saa7115_set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt | |||
915 | 915 | ||
916 | if (pix->height != Vsrc) { | 916 | if (pix->height != Vsrc) { |
917 | VSCY = (int)((1024 * Vsrc) / pix->height); | 917 | VSCY = (int)((1024 * Vsrc) / pix->height); |
918 | v4l_dbg(1, client, "Vsrc: %d, Vscy: 0x%05x\n", Vsrc, VSCY); | 918 | v4l_dbg(1, debug, client, "Vsrc: %d, Vscy: 0x%05x\n", Vsrc, VSCY); |
919 | 919 | ||
920 | /* Correct Contrast and Luminance */ | 920 | /* Correct Contrast and Luminance */ |
921 | saa7115_write(client, 0xd5, (u8) (64 * 1024 / VSCY)); | 921 | saa7115_write(client, 0xd5, (u8) (64 * 1024 / VSCY)); |
@@ -929,10 +929,10 @@ static int saa7115_set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt | |||
929 | saa7115_write(client, 0xe3, (u8) ((VSCY >> 8) & 0xff)); | 929 | saa7115_write(client, 0xe3, (u8) ((VSCY >> 8) & 0xff)); |
930 | } else { | 930 | } else { |
931 | if (is_50hz) { | 931 | if (is_50hz) { |
932 | v4l_dbg(1, client, "Setting full 50Hz height\n"); | 932 | v4l_dbg(1, debug, client, "Setting full 50Hz height\n"); |
933 | saa7115_writeregs(client, saa7115_cfg_50hz_fullres_y); | 933 | saa7115_writeregs(client, saa7115_cfg_50hz_fullres_y); |
934 | } else { | 934 | } else { |
935 | v4l_dbg(1, client, "Setting full 60hz height\n"); | 935 | v4l_dbg(1, debug, client, "Setting full 60hz height\n"); |
936 | saa7115_writeregs(client, saa7115_cfg_60hz_fullres_y); | 936 | saa7115_writeregs(client, saa7115_cfg_60hz_fullres_y); |
937 | } | 937 | } |
938 | } | 938 | } |
@@ -1079,7 +1079,7 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1079 | break; | 1079 | break; |
1080 | status = saa7115_read(client, 0x1f); | 1080 | status = saa7115_read(client, 0x1f); |
1081 | 1081 | ||
1082 | v4l_dbg(1, client, "status: 0x%02x\n", status); | 1082 | v4l_dbg(1, debug, client, "status: 0x%02x\n", status); |
1083 | vt->signal = ((status & (1 << 6)) == 0) ? 0xffff : 0x0; | 1083 | vt->signal = ((status & (1 << 6)) == 0) ? 0xffff : 0x0; |
1084 | break; | 1084 | break; |
1085 | } | 1085 | } |
@@ -1125,7 +1125,7 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1125 | break; | 1125 | break; |
1126 | 1126 | ||
1127 | case VIDIOC_S_INPUT: | 1127 | case VIDIOC_S_INPUT: |
1128 | v4l_dbg(1, client, "decoder set input %d\n", *iarg); | 1128 | v4l_dbg(1, debug, client, "decoder set input %d\n", *iarg); |
1129 | /* inputs from 0-9 are available */ | 1129 | /* inputs from 0-9 are available */ |
1130 | if (*iarg < 0 || *iarg > 9) { | 1130 | if (*iarg < 0 || *iarg > 9) { |
1131 | return -EINVAL; | 1131 | return -EINVAL; |
@@ -1133,7 +1133,7 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1133 | 1133 | ||
1134 | if (state->input == *iarg) | 1134 | if (state->input == *iarg) |
1135 | break; | 1135 | break; |
1136 | v4l_dbg(1, client, "now setting %s input\n", | 1136 | v4l_dbg(1, debug, client, "now setting %s input\n", |
1137 | *iarg >= 6 ? "S-Video" : "Composite"); | 1137 | *iarg >= 6 ? "S-Video" : "Composite"); |
1138 | state->input = *iarg; | 1138 | state->input = *iarg; |
1139 | 1139 | ||
@@ -1150,7 +1150,7 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1150 | 1150 | ||
1151 | case VIDIOC_STREAMON: | 1151 | case VIDIOC_STREAMON: |
1152 | case VIDIOC_STREAMOFF: | 1152 | case VIDIOC_STREAMOFF: |
1153 | v4l_dbg(1, client, "%s output\n", | 1153 | v4l_dbg(1, debug, client, "%s output\n", |
1154 | (cmd == VIDIOC_STREAMON) ? "enable" : "disable"); | 1154 | (cmd == VIDIOC_STREAMON) ? "enable" : "disable"); |
1155 | 1155 | ||
1156 | if (state->enable != (cmd == VIDIOC_STREAMON)) { | 1156 | if (state->enable != (cmd == VIDIOC_STREAMON)) { |
@@ -1164,7 +1164,7 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1164 | break; | 1164 | break; |
1165 | 1165 | ||
1166 | case VIDIOC_INT_RESET: | 1166 | case VIDIOC_INT_RESET: |
1167 | v4l_dbg(1, client, "decoder RESET\n"); | 1167 | v4l_dbg(1, debug, client, "decoder RESET\n"); |
1168 | saa7115_writeregs(client, saa7115_cfg_reset_scaler); | 1168 | saa7115_writeregs(client, saa7115_cfg_reset_scaler); |
1169 | break; | 1169 | break; |
1170 | 1170 | ||
@@ -1257,12 +1257,12 @@ static int saa7115_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1257 | client->driver = &i2c_driver_saa7115; | 1257 | client->driver = &i2c_driver_saa7115; |
1258 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); | 1258 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); |
1259 | 1259 | ||
1260 | v4l_dbg(1, client, "detecting saa7115 client on address 0x%x\n", address << 1); | 1260 | v4l_dbg(1, debug, client, "detecting saa7115 client on address 0x%x\n", address << 1); |
1261 | 1261 | ||
1262 | saa7115_write(client, 0, 5); | 1262 | saa7115_write(client, 0, 5); |
1263 | chip_id = saa7115_read(client, 0) & 0x0f; | 1263 | chip_id = saa7115_read(client, 0) & 0x0f; |
1264 | if (chip_id != 4 && chip_id != 5) { | 1264 | if (chip_id != 4 && chip_id != 5) { |
1265 | v4l_dbg(1, client, "saa7115 not found\n"); | 1265 | v4l_dbg(1, debug, client, "saa7115 not found\n"); |
1266 | kfree(client); | 1266 | kfree(client); |
1267 | return 0; | 1267 | return 0; |
1268 | } | 1268 | } |
@@ -1288,7 +1288,7 @@ static int saa7115_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1288 | state->ident = (chip_id == 4) ? V4L2_IDENT_SAA7114 : V4L2_IDENT_SAA7115; | 1288 | state->ident = (chip_id == 4) ? V4L2_IDENT_SAA7114 : V4L2_IDENT_SAA7115; |
1289 | state->audclk_freq = 48000; | 1289 | state->audclk_freq = 48000; |
1290 | 1290 | ||
1291 | v4l_dbg(1, client, "writing init values\n"); | 1291 | v4l_dbg(1, debug, client, "writing init values\n"); |
1292 | 1292 | ||
1293 | /* init to 60hz/48khz */ | 1293 | /* init to 60hz/48khz */ |
1294 | saa7115_writeregs(client, saa7115_init_auto_input); | 1294 | saa7115_writeregs(client, saa7115_init_auto_input); |
@@ -1301,7 +1301,7 @@ static int saa7115_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1301 | 1301 | ||
1302 | i2c_attach_client(client); | 1302 | i2c_attach_client(client); |
1303 | 1303 | ||
1304 | v4l_dbg(1, client, "status: (1E) 0x%02x, (1F) 0x%02x\n", | 1304 | v4l_dbg(1, debug, client, "status: (1E) 0x%02x, (1F) 0x%02x\n", |
1305 | saa7115_read(client, 0x1e), saa7115_read(client, 0x1f)); | 1305 | saa7115_read(client, 0x1e), saa7115_read(client, 0x1f)); |
1306 | 1306 | ||
1307 | return 0; | 1307 | return 0; |