Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (6867): saa7127: CodingStyle cleanups

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
9fad368b d52c7385

+32 -29
+32 -29
drivers/media/video/saa7127.c
··· 58 58 #include <media/v4l2-i2c-drv.h> 59 59 #include <media/saa7127.h> 60 60 61 - static int debug = 0; 62 - static int test_image = 0; 61 + static int debug; 62 + static int test_image; 63 63 64 64 MODULE_DESCRIPTION("Philips SAA7127/9 video encoder driver"); 65 65 MODULE_AUTHOR("Kevin Thayer, Chris Kennedy, Hans Verkuil"); ··· 357 357 if (enable && (data->field != 0 || data->line != 21)) 358 358 return -EINVAL; 359 359 if (state->cc_enable != enable) { 360 - v4l_dbg(1, debug, client, "Turn CC %s\n", enable ? "on" : "off"); 360 + v4l_dbg(1, debug, client, 361 + "Turn CC %s\n", enable ? "on" : "off"); 361 362 saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, 362 - (state->xds_enable << 7) | (enable << 6) | 0x11); 363 + (state->xds_enable << 7) | (enable << 6) | 0x11); 363 364 state->cc_enable = enable; 364 365 } 365 366 if (!enable) ··· 418 417 419 418 saa7127_write(client, 0x26, data->data[0]); 420 419 saa7127_write(client, 0x27, 0x80 | (data->data[1] & 0x3f)); 421 - v4l_dbg(1, debug, client, "WSS mode: %s\n", wss_strs[data->data[0] & 0xf]); 420 + v4l_dbg(1, debug, client, 421 + "WSS mode: %s\n", wss_strs[data->data[0] & 0xf]); 422 422 state->wss_mode = (data->data[1] & 0x3f) << 8 | data->data[0]; 423 423 return 0; 424 424 } ··· 506 504 default: 507 505 return -EINVAL; 508 506 } 509 - v4l_dbg(1, debug, client, "Selecting %s output type\n", output_strs[output]); 507 + v4l_dbg(1, debug, client, 508 + "Selecting %s output type\n", output_strs[output]); 510 509 511 510 /* Configure Encoder */ 512 511 saa7127_write(client, 0x2d, state->reg_2d); ··· 569 566 { 570 567 int rc = 0; 571 568 572 - if (state->input_type != route->input) { 569 + if (state->input_type != route->input) 573 570 rc = saa7127_set_input_type(client, route->input); 574 - } 575 - if (rc == 0 && state->output_type != route->output) { 571 + if (rc == 0 && state->output_type != route->output) 576 572 rc = saa7127_set_output_type(client, route->output); 577 - } 578 573 return rc; 579 574 } 580 575 ··· 618 617 { 619 618 struct v4l2_register *reg = arg; 620 619 621 - if (!v4l2_chip_match_i2c_client(client, reg->match_type, reg->match_chip)) 620 + if (!v4l2_chip_match_i2c_client(client, 621 + reg->match_type, reg->match_chip)) 622 622 return -EINVAL; 623 623 if (!capable(CAP_SYS_ADMIN)) 624 624 return -EPERM; ··· 636 634 struct v4l2_sliced_vbi_data *data = arg; 637 635 638 636 switch (data->id) { 639 - case V4L2_SLICED_WSS_625: 640 - return saa7127_set_wss(client, data); 641 - case V4L2_SLICED_VPS: 642 - return saa7127_set_vps(client, data); 643 - case V4L2_SLICED_CAPTION_525: 644 - if (data->field == 0) 645 - return saa7127_set_cc(client, data); 646 - return saa7127_set_xds(client, data); 647 - default: 648 - return -EINVAL; 637 + case V4L2_SLICED_WSS_625: 638 + return saa7127_set_wss(client, data); 639 + case V4L2_SLICED_VPS: 640 + return saa7127_set_vps(client, data); 641 + case V4L2_SLICED_CAPTION_525: 642 + if (data->field == 0) 643 + return saa7127_set_cc(client, data); 644 + return saa7127_set_xds(client, data); 645 + default: 646 + return -EINVAL; 649 647 } 650 648 break; 651 649 } ··· 673 671 674 672 snprintf(client->name, sizeof(client->name) - 1, "saa7127"); 675 673 676 - v4l_dbg(1, debug, client, "detecting saa7127 client on address 0x%x\n", client->addr << 1); 674 + v4l_dbg(1, debug, client, "detecting saa7127 client on address 0x%x\n", 675 + client->addr << 1); 677 676 678 677 /* First test register 0: Bits 5-7 are a version ID (should be 0), 679 678 and bit 2 should also be 0. ··· 688 685 } 689 686 state = kzalloc(sizeof(struct saa7127_state), GFP_KERNEL); 690 687 691 - if (state == NULL) { 688 + if (state == NULL) 692 689 return -ENOMEM; 693 - } 694 690 695 691 i2c_set_clientdata(client, state); 696 692 ··· 703 701 saa7127_set_wss(client, &vbi); 704 702 saa7127_set_cc(client, &vbi); 705 703 saa7127_set_xds(client, &vbi); 706 - if (test_image == 1) { 704 + if (test_image == 1) 707 705 /* The Encoder has an internal Colorbar generator */ 708 706 /* This can be used for debugging */ 709 707 saa7127_set_input_type(client, SAA7127_INPUT_TYPE_TEST_IMAGE); 710 - } else { 708 + else 711 709 saa7127_set_input_type(client, SAA7127_INPUT_TYPE_NORMAL); 712 - } 713 710 saa7127_set_video_enable(client, 1); 714 711 715 712 /* Detect if it's an saa7129 */ 716 713 read_result = saa7127_read(client, SAA7129_REG_FADE_KEY_COL2); 717 714 saa7127_write(client, SAA7129_REG_FADE_KEY_COL2, 0xaa); 718 715 if (saa7127_read(client, SAA7129_REG_FADE_KEY_COL2) == 0xaa) { 719 - v4l_info(client, "saa7129 found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); 716 + v4l_info(client, "saa7129 found @ 0x%x (%s)\n", 717 + client->addr << 1, client->adapter->name); 720 718 saa7127_write(client, SAA7129_REG_FADE_KEY_COL2, read_result); 721 719 saa7127_write_inittab(client, saa7129_init_config_extra); 722 720 state->ident = V4L2_IDENT_SAA7129; 723 721 } else { 724 - v4l_info(client, "saa7127 found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); 722 + v4l_info(client, "saa7127 found @ 0x%x (%s)\n", 723 + client->addr << 1, client->adapter->name); 725 724 state->ident = V4L2_IDENT_SAA7127; 726 725 } 727 726 return 0;