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/saa7127.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/saa7127.c')
-rw-r--r-- | drivers/media/video/saa7127.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index d14eb3e5c962..992c71774f30 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -338,7 +338,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
338 | if (enable && (data->field != 0 || data->line != 16)) | 338 | if (enable && (data->field != 0 || data->line != 16)) |
339 | return -EINVAL; | 339 | return -EINVAL; |
340 | if (state->vps_enable != enable) { | 340 | if (state->vps_enable != enable) { |
341 | v4l_dbg(1, client, "Turn VPS Signal %s\n", enable ? "on" : "off"); | 341 | v4l_dbg(1, debug, client, "Turn VPS Signal %s\n", enable ? "on" : "off"); |
342 | saa7127_write(client, 0x54, enable << 7); | 342 | saa7127_write(client, 0x54, enable << 7); |
343 | state->vps_enable = enable; | 343 | state->vps_enable = enable; |
344 | } | 344 | } |
@@ -350,7 +350,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
350 | state->vps_data[2] = data->data[11]; | 350 | state->vps_data[2] = data->data[11]; |
351 | state->vps_data[3] = data->data[12]; | 351 | state->vps_data[3] = data->data[12]; |
352 | state->vps_data[4] = data->data[13]; | 352 | state->vps_data[4] = data->data[13]; |
353 | v4l_dbg(1, client, "Set VPS data %02x %02x %02x %02x %02x\n", | 353 | v4l_dbg(1, debug, client, "Set VPS data %02x %02x %02x %02x %02x\n", |
354 | state->vps_data[0], state->vps_data[1], | 354 | state->vps_data[0], state->vps_data[1], |
355 | state->vps_data[2], state->vps_data[3], | 355 | state->vps_data[2], state->vps_data[3], |
356 | state->vps_data[4]); | 356 | state->vps_data[4]); |
@@ -373,7 +373,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data | |||
373 | if (enable && (data->field != 0 || data->line != 21)) | 373 | if (enable && (data->field != 0 || data->line != 21)) |
374 | return -EINVAL; | 374 | return -EINVAL; |
375 | if (state->cc_enable != enable) { | 375 | if (state->cc_enable != enable) { |
376 | v4l_dbg(1, client, "Turn CC %s\n", enable ? "on" : "off"); | 376 | v4l_dbg(1, debug, client, "Turn CC %s\n", enable ? "on" : "off"); |
377 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, | 377 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, |
378 | (state->xds_enable << 7) | (enable << 6) | 0x11); | 378 | (state->xds_enable << 7) | (enable << 6) | 0x11); |
379 | state->cc_enable = enable; | 379 | state->cc_enable = enable; |
@@ -381,7 +381,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data | |||
381 | if (!enable) | 381 | if (!enable) |
382 | return 0; | 382 | return 0; |
383 | 383 | ||
384 | v4l_dbg(2, client, "CC data: %04x\n", cc); | 384 | v4l_dbg(2, debug, client, "CC data: %04x\n", cc); |
385 | saa7127_write(client, SAA7127_REG_LINE_21_ODD_0, cc & 0xff); | 385 | saa7127_write(client, SAA7127_REG_LINE_21_ODD_0, cc & 0xff); |
386 | saa7127_write(client, SAA7127_REG_LINE_21_ODD_1, cc >> 8); | 386 | saa7127_write(client, SAA7127_REG_LINE_21_ODD_1, cc >> 8); |
387 | state->cc_data = cc; | 387 | state->cc_data = cc; |
@@ -399,7 +399,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
399 | if (enable && (data->field != 1 || data->line != 21)) | 399 | if (enable && (data->field != 1 || data->line != 21)) |
400 | return -EINVAL; | 400 | return -EINVAL; |
401 | if (state->xds_enable != enable) { | 401 | if (state->xds_enable != enable) { |
402 | v4l_dbg(1, client, "Turn XDS %s\n", enable ? "on" : "off"); | 402 | v4l_dbg(1, debug, client, "Turn XDS %s\n", enable ? "on" : "off"); |
403 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, | 403 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, |
404 | (enable << 7) | (state->cc_enable << 6) | 0x11); | 404 | (enable << 7) | (state->cc_enable << 6) | 0x11); |
405 | state->xds_enable = enable; | 405 | state->xds_enable = enable; |
@@ -407,7 +407,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
407 | if (!enable) | 407 | if (!enable) |
408 | return 0; | 408 | return 0; |
409 | 409 | ||
410 | v4l_dbg(2, client, "XDS data: %04x\n", xds); | 410 | v4l_dbg(2, debug, client, "XDS data: %04x\n", xds); |
411 | saa7127_write(client, SAA7127_REG_LINE_21_EVEN_0, xds & 0xff); | 411 | saa7127_write(client, SAA7127_REG_LINE_21_EVEN_0, xds & 0xff); |
412 | saa7127_write(client, SAA7127_REG_LINE_21_EVEN_1, xds >> 8); | 412 | saa7127_write(client, SAA7127_REG_LINE_21_EVEN_1, xds >> 8); |
413 | state->xds_data = xds; | 413 | state->xds_data = xds; |
@@ -424,7 +424,7 @@ static int saa7127_set_wss(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
424 | if (enable && (data->field != 0 || data->line != 23)) | 424 | if (enable && (data->field != 0 || data->line != 23)) |
425 | return -EINVAL; | 425 | return -EINVAL; |
426 | if (state->wss_enable != enable) { | 426 | if (state->wss_enable != enable) { |
427 | v4l_dbg(1, client, "Turn WSS %s\n", enable ? "on" : "off"); | 427 | v4l_dbg(1, debug, client, "Turn WSS %s\n", enable ? "on" : "off"); |
428 | saa7127_write(client, 0x27, enable << 7); | 428 | saa7127_write(client, 0x27, enable << 7); |
429 | state->wss_enable = enable; | 429 | state->wss_enable = enable; |
430 | } | 430 | } |
@@ -433,7 +433,7 @@ static int saa7127_set_wss(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
433 | 433 | ||
434 | saa7127_write(client, 0x26, data->data[0]); | 434 | saa7127_write(client, 0x26, data->data[0]); |
435 | saa7127_write(client, 0x27, 0x80 | (data->data[1] & 0x3f)); | 435 | saa7127_write(client, 0x27, 0x80 | (data->data[1] & 0x3f)); |
436 | v4l_dbg(1, client, "WSS mode: %s\n", wss_strs[data->data[0] & 0xf]); | 436 | v4l_dbg(1, debug, client, "WSS mode: %s\n", wss_strs[data->data[0] & 0xf]); |
437 | state->wss_mode = (data->data[1] & 0x3f) << 8 | data->data[0]; | 437 | state->wss_mode = (data->data[1] & 0x3f) << 8 | data->data[0]; |
438 | return 0; | 438 | return 0; |
439 | } | 439 | } |
@@ -445,11 +445,11 @@ static int saa7127_set_video_enable(struct i2c_client *client, int enable) | |||
445 | struct saa7127_state *state = i2c_get_clientdata(client); | 445 | struct saa7127_state *state = i2c_get_clientdata(client); |
446 | 446 | ||
447 | if (enable) { | 447 | if (enable) { |
448 | v4l_dbg(1, client, "Enable Video Output\n"); | 448 | v4l_dbg(1, debug, client, "Enable Video Output\n"); |
449 | saa7127_write(client, 0x2d, state->reg_2d); | 449 | saa7127_write(client, 0x2d, state->reg_2d); |
450 | saa7127_write(client, 0x61, state->reg_61); | 450 | saa7127_write(client, 0x61, state->reg_61); |
451 | } else { | 451 | } else { |
452 | v4l_dbg(1, client, "Disable Video Output\n"); | 452 | v4l_dbg(1, debug, client, "Disable Video Output\n"); |
453 | saa7127_write(client, 0x2d, (state->reg_2d & 0xf0)); | 453 | saa7127_write(client, 0x2d, (state->reg_2d & 0xf0)); |
454 | saa7127_write(client, 0x61, (state->reg_61 | 0xc0)); | 454 | saa7127_write(client, 0x61, (state->reg_61 | 0xc0)); |
455 | } | 455 | } |
@@ -465,11 +465,11 @@ static int saa7127_set_std(struct i2c_client *client, v4l2_std_id std) | |||
465 | const struct i2c_reg_value *inittab; | 465 | const struct i2c_reg_value *inittab; |
466 | 466 | ||
467 | if (std & V4L2_STD_525_60) { | 467 | if (std & V4L2_STD_525_60) { |
468 | v4l_dbg(1, client, "Selecting 60 Hz video Standard\n"); | 468 | v4l_dbg(1, debug, client, "Selecting 60 Hz video Standard\n"); |
469 | inittab = saa7127_init_config_60hz; | 469 | inittab = saa7127_init_config_60hz; |
470 | state->reg_61 = SAA7127_60HZ_DAC_CONTROL; | 470 | state->reg_61 = SAA7127_60HZ_DAC_CONTROL; |
471 | } else { | 471 | } else { |
472 | v4l_dbg(1, client, "Selecting 50 Hz video Standard\n"); | 472 | v4l_dbg(1, debug, client, "Selecting 50 Hz video Standard\n"); |
473 | inittab = saa7127_init_config_50hz; | 473 | inittab = saa7127_init_config_50hz; |
474 | state->reg_61 = SAA7127_50HZ_DAC_CONTROL; | 474 | state->reg_61 = SAA7127_50HZ_DAC_CONTROL; |
475 | } | 475 | } |
@@ -520,7 +520,7 @@ static int saa7127_set_output_type(struct i2c_client *client, int output) | |||
520 | default: | 520 | default: |
521 | return -EINVAL; | 521 | return -EINVAL; |
522 | } | 522 | } |
523 | v4l_dbg(1, client, "Selecting %s output type\n", output_strs[output]); | 523 | v4l_dbg(1, debug, client, "Selecting %s output type\n", output_strs[output]); |
524 | 524 | ||
525 | /* Configure Encoder */ | 525 | /* Configure Encoder */ |
526 | saa7127_write(client, 0x2d, state->reg_2d); | 526 | saa7127_write(client, 0x2d, state->reg_2d); |
@@ -537,12 +537,12 @@ static int saa7127_set_input_type(struct i2c_client *client, int input) | |||
537 | 537 | ||
538 | switch (input) { | 538 | switch (input) { |
539 | case SAA7127_INPUT_TYPE_NORMAL: /* avia */ | 539 | case SAA7127_INPUT_TYPE_NORMAL: /* avia */ |
540 | v4l_dbg(1, client, "Selecting Normal Encoder Input\n"); | 540 | v4l_dbg(1, debug, client, "Selecting Normal Encoder Input\n"); |
541 | state->reg_3a_cb = 0; | 541 | state->reg_3a_cb = 0; |
542 | break; | 542 | break; |
543 | 543 | ||
544 | case SAA7127_INPUT_TYPE_TEST_IMAGE: /* color bar */ | 544 | case SAA7127_INPUT_TYPE_TEST_IMAGE: /* color bar */ |
545 | v4l_dbg(1, client, "Selecting Color Bar generator\n"); | 545 | v4l_dbg(1, debug, client, "Selecting Color Bar generator\n"); |
546 | state->reg_3a_cb = 0x80; | 546 | state->reg_3a_cb = 0x80; |
547 | break; | 547 | break; |
548 | 548 | ||
@@ -698,7 +698,7 @@ static int saa7127_attach(struct i2c_adapter *adapter, int address, int kind) | |||
698 | client->driver = &i2c_driver_saa7127; | 698 | client->driver = &i2c_driver_saa7127; |
699 | snprintf(client->name, sizeof(client->name) - 1, "saa7127"); | 699 | snprintf(client->name, sizeof(client->name) - 1, "saa7127"); |
700 | 700 | ||
701 | v4l_dbg(1, client, "detecting saa7127 client on address 0x%x\n", address << 1); | 701 | v4l_dbg(1, debug, client, "detecting saa7127 client on address 0x%x\n", address << 1); |
702 | 702 | ||
703 | /* First test register 0: Bits 5-7 are a version ID (should be 0), | 703 | /* First test register 0: Bits 5-7 are a version ID (should be 0), |
704 | and bit 2 should also be 0. | 704 | and bit 2 should also be 0. |
@@ -707,7 +707,7 @@ static int saa7127_attach(struct i2c_adapter *adapter, int address, int kind) | |||
707 | 0x1d after a reset and not expected to ever change. */ | 707 | 0x1d after a reset and not expected to ever change. */ |
708 | if ((saa7127_read(client, 0) & 0xe4) != 0 || | 708 | if ((saa7127_read(client, 0) & 0xe4) != 0 || |
709 | (saa7127_read(client, 0x29) & 0x3f) != 0x1d) { | 709 | (saa7127_read(client, 0x29) & 0x3f) != 0x1d) { |
710 | v4l_dbg(1, client, "saa7127 not found\n"); | 710 | v4l_dbg(1, debug, client, "saa7127 not found\n"); |
711 | kfree(client); | 711 | kfree(client); |
712 | return 0; | 712 | return 0; |
713 | } | 713 | } |
@@ -722,7 +722,7 @@ static int saa7127_attach(struct i2c_adapter *adapter, int address, int kind) | |||
722 | 722 | ||
723 | /* Configure Encoder */ | 723 | /* Configure Encoder */ |
724 | 724 | ||
725 | v4l_dbg(1, client, "Configuring encoder\n"); | 725 | v4l_dbg(1, debug, client, "Configuring encoder\n"); |
726 | saa7127_write_inittab(client, saa7127_init_config_common); | 726 | saa7127_write_inittab(client, saa7127_init_config_common); |
727 | saa7127_set_std(client, V4L2_STD_NTSC); | 727 | saa7127_set_std(client, V4L2_STD_NTSC); |
728 | saa7127_set_output_type(client, SAA7127_OUTPUT_TYPE_BOTH); | 728 | saa7127_set_output_type(client, SAA7127_OUTPUT_TYPE_BOTH); |