aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2009-12-15 06:47:21 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-01-17 08:55:44 -0500
commitf5ae4f6f482191c531ea9e50ac91d9bd2ffca171 (patch)
treea5a1c9553ae58fb19eddbb594f8f0596a3b33e20
parent1e42dc78900e9d0ce89d77f3ba6aca00abd5f1b5 (diff)
V4L/DVB (13809): Fix Checkpatch violations
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/frontends/mb86a16.c109
-rw-r--r--drivers/media/dvb/frontends/mb86a16.h2
-rw-r--r--drivers/media/dvb/frontends/mb86a16_priv.h2
-rw-r--r--drivers/media/dvb/frontends/tda665x.c32
-rw-r--r--drivers/media/dvb/frontends/tda665x.h2
-rw-r--r--drivers/media/dvb/mantis/hopper_cards.c2
-rw-r--r--drivers/media/dvb/mantis/mantis_ca.c4
-rw-r--r--drivers/media/dvb/mantis/mantis_cards.c2
-rw-r--r--drivers/media/dvb/mantis/mantis_core.c48
-rw-r--r--drivers/media/dvb/mantis/mantis_core.h14
-rw-r--r--drivers/media/dvb/mantis/mantis_dma.c11
-rw-r--r--drivers/media/dvb/mantis/mantis_dvb.c12
-rw-r--r--drivers/media/dvb/mantis/mantis_i2c.c2
-rw-r--r--drivers/media/dvb/mantis/mantis_input.c28
-rw-r--r--drivers/media/dvb/mantis/mantis_reg.h2
-rw-r--r--drivers/media/dvb/mantis/mantis_vp1033.c12
-rw-r--r--drivers/media/dvb/mantis/mantis_vp1034.c2
-rw-r--r--drivers/media/dvb/mantis/mantis_vp1041.c9
-rw-r--r--drivers/media/dvb/mantis/mantis_vp2033.c2
-rw-r--r--drivers/media/dvb/mantis/mantis_vp2040.c2
20 files changed, 155 insertions, 144 deletions
diff --git a/drivers/media/dvb/frontends/mb86a16.c b/drivers/media/dvb/frontends/mb86a16.c
index 33387b78d85a..32f20c681442 100644
--- a/drivers/media/dvb/frontends/mb86a16.c
+++ b/drivers/media/dvb/frontends/mb86a16.c
@@ -37,11 +37,11 @@ struct mb86a16_state {
37 const struct mb86a16_config *config; 37 const struct mb86a16_config *config;
38 struct dvb_frontend frontend; 38 struct dvb_frontend frontend;
39 39
40 // tuning parameters 40 /* tuning parameters */
41 int frequency; 41 int frequency;
42 int srate; 42 int srate;
43 43
44 // Internal stuff 44 /* Internal stuff */
45 int master_clk; 45 int master_clk;
46 int deci; 46 int deci;
47 int csel; 47 int csel;
@@ -105,7 +105,7 @@ static int mb86a16_read(struct mb86a16_state *state, u8 reg, u8 *val)
105 .flags = 0, 105 .flags = 0,
106 .buf = b0, 106 .buf = b0,
107 .len = 1 107 .len = 1
108 },{ 108 }, {
109 .addr = state->config->demod_address, 109 .addr = state->config->demod_address,
110 .flags = I2C_M_RD, 110 .flags = I2C_M_RD,
111 .buf = b1, 111 .buf = b1,
@@ -435,7 +435,7 @@ static int signal_det(struct mb86a16_state *state,
435 wait_sym = 80000; 435 wait_sym = 80000;
436 } 436 }
437 for (i = 0; i < 3; i++) { 437 for (i = 0; i < 3; i++) {
438 if (i == 0 ) 438 if (i == 0)
439 smrtd = smrt * 98 / 100; 439 smrtd = smrt * 98 / 100;
440 else if (i == 1) 440 else if (i == 1)
441 smrtd = smrt; 441 smrtd = smrt;
@@ -480,11 +480,11 @@ static int rf_val_set(struct mb86a16_state *state,
480 unsigned char rf_val[5]; 480 unsigned char rf_val[5];
481 int ack = -1; 481 int ack = -1;
482 482
483 if (smrt > 37750 ) 483 if (smrt > 37750)
484 C = 1; 484 C = 1;
485 else if (smrt > 18875) 485 else if (smrt > 18875)
486 C = 2; 486 C = 2;
487 else if (smrt > 5500 ) 487 else if (smrt > 5500)
488 C = 3; 488 C = 3;
489 else 489 else
490 C = 4; 490 C = 4;
@@ -526,7 +526,7 @@ static int rf_val_set(struct mb86a16_state *state,
526 rf_val[2] = (M & 0x00ff0) >> 4; 526 rf_val[2] = (M & 0x00ff0) >> 4;
527 rf_val[3] = ((M & 0x0000f) << 4) | B; 527 rf_val[3] = ((M & 0x0000f) << 4) | B;
528 528
529 // Frequency Set 529 /* Frequency Set */
530 if (mb86a16_write(state, 0x21, rf_val[0]) < 0) 530 if (mb86a16_write(state, 0x21, rf_val[0]) < 0)
531 ack = 0; 531 ack = 0;
532 if (mb86a16_write(state, 0x22, rf_val[1]) < 0) 532 if (mb86a16_write(state, 0x22, rf_val[1]) < 0)
@@ -655,8 +655,8 @@ static int freqerr_chk(struct mb86a16_state *state,
655 unsigned char CRM, AFCML, AFCMH; 655 unsigned char CRM, AFCML, AFCMH;
656 unsigned char temp1, temp2, temp3; 656 unsigned char temp1, temp2, temp3;
657 int crm, afcm, AFCM; 657 int crm, afcm, AFCM;
658 int crrerr, afcerr; // [kHz] 658 int crrerr, afcerr; /* kHz */
659 int frqerr; // [MHz] 659 int frqerr; /* MHz */
660 int afcen, afcexen = 0; 660 int afcen, afcexen = 0;
661 int R, M, fOSC, fOSC_OFS; 661 int R, M, fOSC, fOSC_OFS;
662 662
@@ -718,12 +718,12 @@ static int freqerr_chk(struct mb86a16_state *state,
718 718
719 fOSC_OFS = fOSC - fTP; 719 fOSC_OFS = fOSC - fTP;
720 720
721 if (unit == 0) { //[MHz] 721 if (unit == 0) { /* MHz */
722 if (crrerr + afcerr + fOSC_OFS * 1000 >= 0) 722 if (crrerr + afcerr + fOSC_OFS * 1000 >= 0)
723 frqerr = (crrerr + afcerr + fOSC_OFS * 1000 + 500) / 1000; 723 frqerr = (crrerr + afcerr + fOSC_OFS * 1000 + 500) / 1000;
724 else 724 else
725 frqerr = (crrerr + afcerr + fOSC_OFS * 1000 - 500) / 1000; 725 frqerr = (crrerr + afcerr + fOSC_OFS * 1000 - 500) / 1000;
726 } else { //[kHz] 726 } else { /* kHz */
727 frqerr = crrerr + afcerr + fOSC_OFS * 1000; 727 frqerr = crrerr + afcerr + fOSC_OFS * 1000;
728 } 728 }
729 729
@@ -760,13 +760,13 @@ static void swp_info_get(struct mb86a16_state *state,
760 760
761 crnt_swp_freq = fOSC_start * 1000 + v * swp_ofs; 761 crnt_swp_freq = fOSC_start * 1000 + v * swp_ofs;
762 762
763 if (R == 0 ) 763 if (R == 0)
764 *fOSC = (crnt_swp_freq + 1000) / 2000 * 2; 764 *fOSC = (crnt_swp_freq + 1000) / 2000 * 2;
765 else 765 else
766 *fOSC = (crnt_swp_freq + 500) / 1000; 766 *fOSC = (crnt_swp_freq + 500) / 1000;
767 767
768 if (*fOSC >= crnt_swp_freq) 768 if (*fOSC >= crnt_swp_freq)
769 *afcex_freq = *fOSC *1000 - crnt_swp_freq; 769 *afcex_freq = *fOSC * 1000 - crnt_swp_freq;
770 else 770 else
771 *afcex_freq = crnt_swp_freq - *fOSC * 1000; 771 *afcex_freq = crnt_swp_freq - *fOSC * 1000;
772 772
@@ -782,7 +782,7 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
782 int swp_freq ; 782 int swp_freq ;
783 783
784 if ((i % 2 == 1) && (v <= vmax)) { 784 if ((i % 2 == 1) && (v <= vmax)) {
785 // positive v (case 1) 785 /* positive v (case 1) */
786 if ((v - 1 == vmin) && 786 if ((v - 1 == vmin) &&
787 (*(V + 30 + v) >= 0) && 787 (*(V + 30 + v) >= 0) &&
788 (*(V + 30 + v - 1) >= 0) && 788 (*(V + 30 + v - 1) >= 0) &&
@@ -796,7 +796,7 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
796 (*(V + 30 + v - 1) >= 0) && 796 (*(V + 30 + v - 1) >= 0) &&
797 (*(V + 30 + v) > *(V + 30 + v - 1)) && 797 (*(V + 30 + v) > *(V + 30 + v - 1)) &&
798 (*(V + 30 + v) > SIGMIN)) { 798 (*(V + 30 + v) > SIGMIN)) {
799 // (case 2) 799 /* (case 2) */
800 swp_freq = fOSC * 1000 + afcex_freq; 800 swp_freq = fOSC * 1000 + afcex_freq;
801 *SIG1 = *(V + 30 + v); 801 *SIG1 = *(V + 30 + v);
802 } else if ((*(V + 30 + v) > 0) && 802 } else if ((*(V + 30 + v) > 0) &&
@@ -807,7 +807,7 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
807 (*(V + 30 + v - 2) > *(V + 30 + v - 3)) && 807 (*(V + 30 + v - 2) > *(V + 30 + v - 3)) &&
808 ((*(V + 30 + v - 1) > SIGMIN) || 808 ((*(V + 30 + v - 1) > SIGMIN) ||
809 (*(V + 30 + v - 2) > SIGMIN))) { 809 (*(V + 30 + v - 2) > SIGMIN))) {
810 // (case 3) 810 /* (case 3) */
811 if (*(V + 30 + v - 1) >= *(V + 30 + v - 2)) { 811 if (*(V + 30 + v - 1) >= *(V + 30 + v - 2)) {
812 swp_freq = fOSC * 1000 + afcex_freq - swp_ofs; 812 swp_freq = fOSC * 1000 + afcex_freq - swp_ofs;
813 *SIG1 = *(V + 30 + v - 1); 813 *SIG1 = *(V + 30 + v - 1);
@@ -823,7 +823,7 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
823 (*(V + 30 + v - 1) > *(V + 30 + v - 2)) && 823 (*(V + 30 + v - 1) > *(V + 30 + v - 2)) &&
824 ((*(V + 30 + v) > SIGMIN) || 824 ((*(V + 30 + v) > SIGMIN) ||
825 (*(V + 30 + v - 1) > SIGMIN))) { 825 (*(V + 30 + v - 1) > SIGMIN))) {
826 // (case 4) 826 /* (case 4) */
827 if (*(V + 30 + v) >= *(V + 30 + v - 1)) { 827 if (*(V + 30 + v) >= *(V + 30 + v - 1)) {
828 swp_freq = fOSC * 1000 + afcex_freq; 828 swp_freq = fOSC * 1000 + afcex_freq;
829 *SIG1 = *(V + 30 + v); 829 *SIG1 = *(V + 30 + v);
@@ -835,7 +835,7 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
835 swp_freq = -1 ; 835 swp_freq = -1 ;
836 } 836 }
837 } else if ((i % 2 == 0) && (v >= vmin)) { 837 } else if ((i % 2 == 0) && (v >= vmin)) {
838 // Negative v (case 1) 838 /* Negative v (case 1) */
839 if ((*(V + 30 + v) > 0) && 839 if ((*(V + 30 + v) > 0) &&
840 (*(V + 30 + v + 1) > 0) && 840 (*(V + 30 + v + 1) > 0) &&
841 (*(V + 30 + v + 2) > 0) && 841 (*(V + 30 + v + 2) > 0) &&
@@ -850,7 +850,7 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
850 (*(V + 30 + v + 1) >= 0) && 850 (*(V + 30 + v + 1) >= 0) &&
851 (*(V + 30 + v + 1) > *(V + 30 + v)) && 851 (*(V + 30 + v + 1) > *(V + 30 + v)) &&
852 (*(V + 30 + v + 1) > SIGMIN)) { 852 (*(V + 30 + v + 1) > SIGMIN)) {
853 // (case 2) 853 /* (case 2) */
854 swp_freq = fOSC * 1000 + afcex_freq + swp_ofs; 854 swp_freq = fOSC * 1000 + afcex_freq + swp_ofs;
855 *SIG1 = *(V + 30 + v); 855 *SIG1 = *(V + 30 + v);
856 } else if ((v == vmin) && 856 } else if ((v == vmin) &&
@@ -860,18 +860,18 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
860 (*(V + 30 + v) > *(V + 30 + v + 1)) && 860 (*(V + 30 + v) > *(V + 30 + v + 1)) &&
861 (*(V + 30 + v) > *(V + 30 + v + 2)) && 861 (*(V + 30 + v) > *(V + 30 + v + 2)) &&
862 (*(V + 30 + v) > SIGMIN)) { 862 (*(V + 30 + v) > SIGMIN)) {
863 // (case 3) 863 /* (case 3) */
864 swp_freq = fOSC * 1000 + afcex_freq; 864 swp_freq = fOSC * 1000 + afcex_freq;
865 *SIG1 = *(V + 30 + v); 865 *SIG1 = *(V + 30 + v);
866 } else if ((*(V + 30 + v) >= 0) && 866 } else if ((*(V + 30 + v) >= 0) &&
867 (*(V + 30 + v + 1) >= 0) && 867 (*(V + 30 + v + 1) >= 0) &&
868 (*(V + 30 + v + 2) >= 0) && 868 (*(V + 30 + v + 2) >= 0) &&
869 (*(V +30 + v + 3) >= 0) && 869 (*(V + 30 + v + 3) >= 0) &&
870 (*(V + 30 + v + 1) > *(V + 30 + v)) && 870 (*(V + 30 + v + 1) > *(V + 30 + v)) &&
871 (*(V + 30 + v + 2) > *(V + 30 + v + 3)) && 871 (*(V + 30 + v + 2) > *(V + 30 + v + 3)) &&
872 ((*(V + 30 + v + 1) > SIGMIN) || 872 ((*(V + 30 + v + 1) > SIGMIN) ||
873 (*(V + 30 + v + 2) > SIGMIN))) { 873 (*(V + 30 + v + 2) > SIGMIN))) {
874 // (case 4) 874 /* (case 4) */
875 if (*(V + 30 + v + 1) >= *(V + 30 + v + 2)) { 875 if (*(V + 30 + v + 1) >= *(V + 30 + v + 2)) {
876 swp_freq = fOSC * 1000 + afcex_freq + swp_ofs; 876 swp_freq = fOSC * 1000 + afcex_freq + swp_ofs;
877 *SIG1 = *(V + 30 + v + 1); 877 *SIG1 = *(V + 30 + v + 1);
@@ -889,7 +889,7 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
889 (*(V + 30 + v + 1) > *(V + 30 + v + 3)) && 889 (*(V + 30 + v + 1) > *(V + 30 + v + 3)) &&
890 ((*(V + 30 + v) > SIGMIN) || 890 ((*(V + 30 + v) > SIGMIN) ||
891 (*(V + 30 + v + 1) > SIGMIN))) { 891 (*(V + 30 + v + 1) > SIGMIN))) {
892 // (case 5) 892 /* (case 5) */
893 if (*(V + 30 + v) >= *(V + 30 + v + 1)) { 893 if (*(V + 30 + v) >= *(V + 30 + v + 1)) {
894 swp_freq = fOSC * 1000 + afcex_freq; 894 swp_freq = fOSC * 1000 + afcex_freq;
895 *SIG1 = *(V + 30 + v); 895 *SIG1 = *(V + 30 + v);
@@ -905,7 +905,7 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
905 (*(V + 30 + v + 2) > *(V + 30 + v)) && 905 (*(V + 30 + v + 2) > *(V + 30 + v)) &&
906 ((*(V + 30 + v + 1) > SIGMIN) || 906 ((*(V + 30 + v + 1) > SIGMIN) ||
907 (*(V + 30 + v + 2) > SIGMIN))) { 907 (*(V + 30 + v + 2) > SIGMIN))) {
908 // (case 6) 908 /* (case 6) */
909 if (*(V + 30 + v + 1) >= *(V + 30 + v + 2)) { 909 if (*(V + 30 + v + 1) >= *(V + 30 + v + 2)) {
910 swp_freq = fOSC * 1000 + afcex_freq + swp_ofs; 910 swp_freq = fOSC * 1000 + afcex_freq + swp_ofs;
911 *SIG1 = *(V + 30 + v + 1); 911 *SIG1 = *(V + 30 + v + 1);
@@ -916,8 +916,10 @@ static int swp_freq_calcuation(struct mb86a16_state *state, int i, int v, int *V
916 } else if ((vmax == 0) && (vmin == 0) && (*(V + 30 + v) > SIGMIN)) { 916 } else if ((vmax == 0) && (vmin == 0) && (*(V + 30 + v) > SIGMIN)) {
917 swp_freq = fOSC * 1000; 917 swp_freq = fOSC * 1000;
918 *SIG1 = *(V + 30 + v); 918 *SIG1 = *(V + 30 + v);
919 } else swp_freq = -1; 919 } else
920 } else swp_freq = -1; 920 swp_freq = -1;
921 } else
922 swp_freq = -1;
921 923
922 return swp_freq; 924 return swp_freq;
923} 925}
@@ -962,7 +964,7 @@ static void afcex_info_get(struct mb86a16_state *state,
962 964
963static int SEQ_set(struct mb86a16_state *state, unsigned char loop) 965static int SEQ_set(struct mb86a16_state *state, unsigned char loop)
964{ 966{
965 // SLOCK0 = 0 967 /* SLOCK0 = 0 */
966 if (mb86a16_write(state, 0x32, 0x02 | (loop << 2)) < 0) { 968 if (mb86a16_write(state, 0x32, 0x02 | (loop << 2)) < 0) {
967 dprintk(verbose, MB86A16_ERROR, 1, "I2C transfer error"); 969 dprintk(verbose, MB86A16_ERROR, 1, "I2C transfer error");
968 return -EREMOTEIO; 970 return -EREMOTEIO;
@@ -973,7 +975,7 @@ static int SEQ_set(struct mb86a16_state *state, unsigned char loop)
973 975
974static int iq_vt_set(struct mb86a16_state *state, unsigned char IQINV) 976static int iq_vt_set(struct mb86a16_state *state, unsigned char IQINV)
975{ 977{
976 // Viterbi Rate, IQ Settings 978 /* Viterbi Rate, IQ Settings */
977 if (mb86a16_write(state, 0x06, 0xdf | (IQINV << 5)) < 0) { 979 if (mb86a16_write(state, 0x06, 0xdf | (IQINV << 5)) < 0) {
978 dprintk(verbose, MB86A16_ERROR, 1, "I2C transfer error"); 980 dprintk(verbose, MB86A16_ERROR, 1, "I2C transfer error");
979 return -EREMOTEIO; 981 return -EREMOTEIO;
@@ -1031,7 +1033,7 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1031 unsigned char TIMINT1, TIMINT2, TIMEXT; 1033 unsigned char TIMINT1, TIMINT2, TIMEXT;
1032 unsigned char S0T, S1T; 1034 unsigned char S0T, S1T;
1033 unsigned char S2T; 1035 unsigned char S2T;
1034// unsigned char S2T, S3T; 1036/* unsigned char S2T, S3T; */
1035 unsigned char S4T, S5T; 1037 unsigned char S4T, S5T;
1036 unsigned char AFCEX_L, AFCEX_H; 1038 unsigned char AFCEX_L, AFCEX_H;
1037 unsigned char R; 1039 unsigned char R;
@@ -1052,7 +1054,7 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1052 int temp_freq, delta_freq; 1054 int temp_freq, delta_freq;
1053 int dagcm[4]; 1055 int dagcm[4];
1054 int smrt_d; 1056 int smrt_d;
1055// int freq_err; 1057/* int freq_err; */
1056 int n; 1058 int n;
1057 int ret = -1; 1059 int ret = -1;
1058 int sync; 1060 int sync;
@@ -1093,19 +1095,19 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1093 } 1095 }
1094 if (EN_set(state, CREN, AFCEN) < 0) { 1096 if (EN_set(state, CREN, AFCEN) < 0) {
1095 dprintk(verbose, MB86A16_ERROR, 1, "EN set error"); 1097 dprintk(verbose, MB86A16_ERROR, 1, "EN set error");
1096 return -1; // (0, 0) 1098 return -1; /* (0, 0) */
1097 } 1099 }
1098 if (AFCEXEN_set(state, AFCEXEN, state->srate) < 0) { 1100 if (AFCEXEN_set(state, AFCEXEN, state->srate) < 0) {
1099 dprintk(verbose, MB86A16_ERROR, 1, "AFCEXEN set error"); 1101 dprintk(verbose, MB86A16_ERROR, 1, "AFCEXEN set error");
1100 return -1; // (1, smrt) = (1, symbolrate) 1102 return -1; /* (1, smrt) = (1, symbolrate) */
1101 } 1103 }
1102 if (CNTM_set(state, TIMINT1, TIMINT2, TIMEXT) < 0) { 1104 if (CNTM_set(state, TIMINT1, TIMINT2, TIMEXT) < 0) {
1103 dprintk(verbose, MB86A16_ERROR, 1, "CNTM set error"); 1105 dprintk(verbose, MB86A16_ERROR, 1, "CNTM set error");
1104 return -1; // (0, 1, 2) 1106 return -1; /* (0, 1, 2) */
1105 } 1107 }
1106 if (S01T_set(state, S1T, S0T) < 0) { 1108 if (S01T_set(state, S1T, S0T) < 0) {
1107 dprintk(verbose, MB86A16_ERROR, 1, "S01T set error"); 1109 dprintk(verbose, MB86A16_ERROR, 1, "S01T set error");
1108 return -1; // (0, 0) 1110 return -1; /* (0, 0) */
1109 } 1111 }
1110 smrt_info_get(state, state->srate); 1112 smrt_info_get(state, state->srate);
1111 if (smrt_set(state, state->srate) < 0) { 1113 if (smrt_set(state, state->srate) < 0) {
@@ -1133,13 +1135,15 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1133 ftemp = ftemp + swp_ofs; 1135 ftemp = ftemp + swp_ofs;
1134 vmax++; 1136 vmax++;
1135 1137
1136 // Upper bound 1138 /* Upper bound */
1137 if (ftemp > 2150000) { 1139 if (ftemp > 2150000) {
1138 loop = 0; 1140 loop = 0;
1139 vmax--; 1141 vmax--;
1142 } else {
1143 if ((ftemp == 2150000) ||
1144 (ftemp - state->frequency * 1000 >= fcp + state->srate / 4))
1145 loop = 0;
1140 } 1146 }
1141 else if ((ftemp == 2150000) || (ftemp - state->frequency * 1000 >= fcp + state->srate / 4))
1142 loop = 0;
1143 } 1147 }
1144 1148
1145 loop = 1; 1149 loop = 1;
@@ -1149,13 +1153,15 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1149 ftemp = ftemp - swp_ofs; 1153 ftemp = ftemp - swp_ofs;
1150 vmin--; 1154 vmin--;
1151 1155
1152 // Lower bound 1156 /* Lower bound */
1153 if (ftemp < 950000) { 1157 if (ftemp < 950000) {
1154 loop = 0; 1158 loop = 0;
1155 vmin++; 1159 vmin++;
1160 } else {
1161 if ((ftemp == 950000) ||
1162 (state->frequency * 1000 - ftemp >= fcp + state->srate / 4))
1163 loop = 0;
1156 } 1164 }
1157 else if ((ftemp == 950000) || (state->frequency * 1000 - ftemp >= fcp + state->srate / 4))
1158 loop = 0;
1159 } 1165 }
1160 1166
1161 wait_t = (8000 + state->srate / 2) / state->srate; 1167 wait_t = (8000 + state->srate / 2) / state->srate;
@@ -1199,7 +1205,7 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1199 V[30 + v] = SIG1 ; 1205 V[30 + v] = SIG1 ;
1200 swp_freq = swp_freq_calcuation(state, i, v, V, vmax, vmin, 1206 swp_freq = swp_freq_calcuation(state, i, v, V, vmax, vmin,
1201 SIG1MIN, fOSC, afcex_freq, 1207 SIG1MIN, fOSC, afcex_freq,
1202 swp_ofs, &SIG1); //changed 1208 swp_ofs, &SIG1); /* changed */
1203 1209
1204 signal_dupl = 0; 1210 signal_dupl = 0;
1205 for (j = 0; j < prev_freq_num; j++) { 1211 for (j = 0; j < prev_freq_num; j++) {
@@ -1291,7 +1297,7 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1291 dprintk(verbose, MB86A16_ERROR, 1, "srst error"); 1297 dprintk(verbose, MB86A16_ERROR, 1, "srst error");
1292 return -1; 1298 return -1;
1293 } 1299 }
1294 // delay 4~200 1300 /* delay 4~200 */
1295 wait_t = 200000 / state->master_clk + 200000 / state->srate; 1301 wait_t = 200000 / state->master_clk + 200000 / state->srate;
1296 msleep(wait_t); 1302 msleep(wait_t);
1297 afcerr = afcerr_chk(state); 1303 afcerr = afcerr_chk(state);
@@ -1452,7 +1458,7 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1452 S2T = 7; S4T = 2; S5T = 8; ETH = 7; VIA = 2; 1458 S2T = 7; S4T = 2; S5T = 8; ETH = 7; VIA = 2;
1453 wait_t = 7 + (2097152 + state->srate / 2) / state->srate; 1459 wait_t = 7 + (2097152 + state->srate / 2) / state->srate;
1454 } 1460 }
1455 wait_t *= 2; /* FOS */ 1461 wait_t *= 2; /* FOS */
1456 S2T_set(state, S2T); 1462 S2T_set(state, S2T);
1457 S45T_set(state, S4T, S5T); 1463 S45T_set(state, S4T, S5T);
1458 Vi_set(state, ETH, VIA); 1464 Vi_set(state, ETH, VIA);
@@ -1461,13 +1467,14 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1461 sync = sync_chk(state, &VIRM); 1467 sync = sync_chk(state, &VIRM);
1462 dprintk(verbose, MB86A16_INFO, 1, "-------- Viterbi=[%d] SYNC=[%d] ---------", VIRM, sync); 1468 dprintk(verbose, MB86A16_INFO, 1, "-------- Viterbi=[%d] SYNC=[%d] ---------", VIRM, sync);
1463 if (VIRM) { 1469 if (VIRM) {
1464 if (VIRM == 4) { // 5/6 1470 if (VIRM == 4) {
1471 /* 5/6 */
1465 if (SIG1 > 110) 1472 if (SIG1 > 110)
1466 wait_t = ( 786432 + state->srate / 2) / state->srate; 1473 wait_t = (786432 + state->srate / 2) / state->srate;
1467 else 1474 else
1468 wait_t = (1572864 + state->srate / 2) / state->srate; 1475 wait_t = (1572864 + state->srate / 2) / state->srate;
1469 if (state->srate < 5000) 1476 if (state->srate < 5000)
1470 // FIXME ! , should be a long wait ! 1477 /* FIXME ! , should be a long wait ! */
1471 msleep_interruptible(wait_t); 1478 msleep_interruptible(wait_t);
1472 else 1479 else
1473 msleep_interruptible(wait_t); 1480 msleep_interruptible(wait_t);
@@ -1477,9 +1484,9 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1477 FEC_srst(state); 1484 FEC_srst(state);
1478 } 1485 }
1479 } 1486 }
1480 // 1/2, 2/3, 3/4, 7/8 1487 /* 1/2, 2/3, 3/4, 7/8 */
1481 if (SIG1 > 110) 1488 if (SIG1 > 110)
1482 wait_t = ( 786432 + state->srate / 2) / state->srate; 1489 wait_t = (786432 + state->srate / 2) / state->srate;
1483 else 1490 else
1484 wait_t = (1572864 + state->srate / 2) / state->srate; 1491 wait_t = (1572864 + state->srate / 2) / state->srate;
1485 msleep_interruptible(wait_t); 1492 msleep_interruptible(wait_t);
@@ -1491,7 +1498,7 @@ static int mb86a16_set_fe(struct mb86a16_state *state)
1491 } 1498 }
1492 } 1499 }
1493 } else { 1500 } else {
1494 dprintk (verbose, MB86A16_INFO, 1, "NO -- SIGNAL"); 1501 dprintk(verbose, MB86A16_INFO, 1, "NO -- SIGNAL");
1495 ret = -1; 1502 ret = -1;
1496 } 1503 }
1497 1504
@@ -1846,7 +1853,7 @@ struct dvb_frontend *mb86a16_attach(const struct mb86a16_config *config,
1846 u8 dev_id = 0; 1853 u8 dev_id = 0;
1847 struct mb86a16_state *state = NULL; 1854 struct mb86a16_state *state = NULL;
1848 1855
1849 state = kmalloc(sizeof (struct mb86a16_state), GFP_KERNEL); 1856 state = kmalloc(sizeof(struct mb86a16_state), GFP_KERNEL);
1850 if (state == NULL) 1857 if (state == NULL)
1851 goto error; 1858 goto error;
1852 1859
@@ -1857,7 +1864,7 @@ struct dvb_frontend *mb86a16_attach(const struct mb86a16_config *config,
1857 if (dev_id != 0xfe) 1864 if (dev_id != 0xfe)
1858 goto error; 1865 goto error;
1859 1866
1860 memcpy(&state->frontend.ops, &mb86a16_ops, sizeof (struct dvb_frontend_ops)); 1867 memcpy(&state->frontend.ops, &mb86a16_ops, sizeof(struct dvb_frontend_ops));
1861 state->frontend.demodulator_priv = state; 1868 state->frontend.demodulator_priv = state;
1862 state->frontend.ops.set_voltage = state->config->set_voltage; 1869 state->frontend.ops.set_voltage = state->config->set_voltage;
1863 1870
diff --git a/drivers/media/dvb/frontends/mb86a16.h b/drivers/media/dvb/frontends/mb86a16.h
index b7545d0343f1..68f25a640173 100644
--- a/drivers/media/dvb/frontends/mb86a16.h
+++ b/drivers/media/dvb/frontends/mb86a16.h
@@ -35,4 +35,4 @@ extern struct dvb_frontend *mb86a16_attach(const struct mb86a16_config *config,
35 struct i2c_adapter *i2c_adap); 35 struct i2c_adapter *i2c_adap);
36 36
37 37
38#endif //__MB86A16_H 38#endif /* __MB86A16_H */
diff --git a/drivers/media/dvb/frontends/mb86a16_priv.h b/drivers/media/dvb/frontends/mb86a16_priv.h
index 5de570068060..d8757fafcf1f 100644
--- a/drivers/media/dvb/frontends/mb86a16_priv.h
+++ b/drivers/media/dvb/frontends/mb86a16_priv.h
@@ -148,4 +148,4 @@
148#define MB86A16_DISTMON 0x52 148#define MB86A16_DISTMON 0x52
149#define MB86A16_VERSION 0x7f 149#define MB86A16_VERSION 0x7f
150 150
151#endif //__MB86A16_PRIV_H 151#endif /* __MB86A16_PRIV_H */
diff --git a/drivers/media/dvb/frontends/tda665x.c b/drivers/media/dvb/frontends/tda665x.c
index 0732a2d38e10..87d52739c828 100644
--- a/drivers/media/dvb/frontends/tda665x.c
+++ b/drivers/media/dvb/frontends/tda665x.c
@@ -45,7 +45,7 @@ static int tda665x_read(struct tda665x_state *state, u8 *buf)
45 45
46 return err; 46 return err;
47exit: 47exit:
48 printk("%s: I/O Error err=<%d>\n", __func__, err); 48 printk(KERN_ERR "%s: I/O Error err=<%d>\n", __func__, err);
49 return err; 49 return err;
50} 50}
51 51
@@ -61,7 +61,7 @@ static int tda665x_write(struct tda665x_state *state, u8 *buf, u8 length)
61 61
62 return err; 62 return err;
63exit: 63exit:
64 printk("%s: I/O Error err=<%d>\n", __func__, err); 64 printk(KERN_ERR "%s: I/O Error err=<%d>\n", __func__, err);
65 return err; 65 return err;
66} 66}
67 67
@@ -79,7 +79,7 @@ static int tda665x_get_state(struct dvb_frontend *fe,
79 case DVBFE_TUNER_BANDWIDTH: 79 case DVBFE_TUNER_BANDWIDTH:
80 break; 80 break;
81 default: 81 default:
82 printk("%s: Unknown parameter (param=%d)\n", __func__, param); 82 printk(KERN_ERR "%s: Unknown parameter (param=%d)\n", __func__, param);
83 err = -EINVAL; 83 err = -EINVAL;
84 break; 84 break;
85 } 85 }
@@ -100,13 +100,13 @@ static int tda665x_get_status(struct dvb_frontend *fe, u32 *status)
100 goto exit; 100 goto exit;
101 101
102 if ((result >> 6) & 0x01) { 102 if ((result >> 6) & 0x01) {
103 printk("%s: Tuner Phase Locked\n", __func__); 103 printk(KERN_DEBUG "%s: Tuner Phase Locked\n", __func__);
104 *status = 1; 104 *status = 1;
105 } 105 }
106 106
107 return err; 107 return err;
108exit: 108exit:
109 printk("%s: I/O Error\n", __func__); 109 printk(KERN_ERR "%s: I/O Error\n", __func__);
110 return err; 110 return err;
111} 111}
112 112
@@ -124,7 +124,7 @@ static int tda665x_set_state(struct dvb_frontend *fe,
124 124
125 frequency = tstate->frequency; 125 frequency = tstate->frequency;
126 if ((frequency < config->frequency_max) || (frequency > config->frequency_min)) { 126 if ((frequency < config->frequency_max) || (frequency > config->frequency_min)) {
127 printk("%s: Frequency beyond limits, frequency=%d\n", __func__, frequency); 127 printk(KERN_ERR "%s: Frequency beyond limits, frequency=%d\n", __func__, frequency);
128 return -EINVAL; 128 return -EINVAL;
129 } 129 }
130 130
@@ -133,8 +133,8 @@ static int tda665x_set_state(struct dvb_frontend *fe,
133 frequency += config->ref_divider >> 1; 133 frequency += config->ref_divider >> 1;
134 frequency /= config->ref_divider; 134 frequency /= config->ref_divider;
135 135
136 buf[0] = (u8 ) (frequency & 0x7f00) >> 8; 136 buf[0] = (u8) (frequency & 0x7f00) >> 8;
137 buf[1] = (u8 ) (frequency & 0x00ff) >> 0; 137 buf[1] = (u8) (frequency & 0x00ff) >> 0;
138 buf[2] = 0x80 | 0x40 | 0x02; 138 buf[2] = 0x80 | 0x40 | 0x02;
139 buf[3] = 0x00; 139 buf[3] = 0x00;
140 140
@@ -178,7 +178,7 @@ static int tda665x_set_state(struct dvb_frontend *fe,
178 goto exit; 178 goto exit;
179 179
180 /* sleep for some time */ 180 /* sleep for some time */
181 printk("%s: Waiting to Phase LOCK\n", __func__); 181 printk(KERN_DEBUG "%s: Waiting to Phase LOCK\n", __func__);
182 msleep(20); 182 msleep(20);
183 /* check status */ 183 /* check status */
184 err = tda665x_get_status(fe, &status); 184 err = tda665x_get_status(fe, &status);
@@ -186,19 +186,19 @@ static int tda665x_set_state(struct dvb_frontend *fe,
186 goto exit; 186 goto exit;
187 187
188 if (status == 1) { 188 if (status == 1) {
189 printk("%s: Tuner Phase locked: status=%d\n", __func__, status); 189 printk(KERN_DEBUG "%s: Tuner Phase locked: status=%d\n", __func__, status);
190 state->frequency = frequency; /* cache successful state */ 190 state->frequency = frequency; /* cache successful state */
191 } else { 191 } else {
192 printk("%s: No Phase lock: status=%d\n", __func__, status); 192 printk(KERN_ERR "%s: No Phase lock: status=%d\n", __func__, status);
193 } 193 }
194 } else { 194 } else {
195 printk("%s: Unknown parameter (param=%d)\n", __func__, param); 195 printk(KERN_ERR "%s: Unknown parameter (param=%d)\n", __func__, param);
196 return -EINVAL; 196 return -EINVAL;
197 } 197 }
198 198
199 return 0; 199 return 0;
200exit: 200exit:
201 printk("%s: I/O Error\n", __func__); 201 printk(KERN_ERR "%s: I/O Error\n", __func__);
202 return err; 202 return err;
203} 203}
204 204
@@ -226,7 +226,7 @@ struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
226 struct tda665x_state *state = NULL; 226 struct tda665x_state *state = NULL;
227 struct dvb_tuner_info *info; 227 struct dvb_tuner_info *info;
228 228
229 state = kzalloc(sizeof (struct tda665x_state), GFP_KERNEL); 229 state = kzalloc(sizeof(struct tda665x_state), GFP_KERNEL);
230 if (state == NULL) 230 if (state == NULL)
231 goto exit; 231 goto exit;
232 232
@@ -237,12 +237,12 @@ struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
237 fe->ops.tuner_ops = tda665x_ops; 237 fe->ops.tuner_ops = tda665x_ops;
238 info = &fe->ops.tuner_ops.info; 238 info = &fe->ops.tuner_ops.info;
239 239
240 memcpy(info->name, config->name, sizeof (config->name)); 240 memcpy(info->name, config->name, sizeof(config->name));
241 info->frequency_min = config->frequency_min; 241 info->frequency_min = config->frequency_min;
242 info->frequency_max = config->frequency_max; 242 info->frequency_max = config->frequency_max;
243 info->frequency_step = config->frequency_offst; 243 info->frequency_step = config->frequency_offst;
244 244
245 printk("%s: Attaching TDA665x (%s) tuner\n", __func__, info->name); 245 printk(KERN_DEBUG "%s: Attaching TDA665x (%s) tuner\n", __func__, info->name);
246 246
247 return fe; 247 return fe;
248 248
diff --git a/drivers/media/dvb/frontends/tda665x.h b/drivers/media/dvb/frontends/tda665x.h
index c0b544d8ef57..ec7927aa75ae 100644
--- a/drivers/media/dvb/frontends/tda665x.h
+++ b/drivers/media/dvb/frontends/tda665x.h
@@ -40,7 +40,7 @@ extern struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
40#else 40#else
41 41
42static inline struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe, 42static inline struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
43 const struct tda665x_config *config, 43 const struct tda665x_config *config,
44 struct i2c_adapter *i2c) 44 struct i2c_adapter *i2c)
45{ 45{
46 printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__); 46 printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
diff --git a/drivers/media/dvb/mantis/hopper_cards.c b/drivers/media/dvb/mantis/hopper_cards.c
index 6d5d101f0ab0..ca70149f3ddf 100644
--- a/drivers/media/dvb/mantis/hopper_cards.c
+++ b/drivers/media/dvb/mantis/hopper_cards.c
@@ -137,7 +137,7 @@ static int __devinit hopper_pci_probe(struct pci_dev *pdev, const struct pci_dev
137 struct mantis_hwconfig *config; 137 struct mantis_hwconfig *config;
138 int err = 0; 138 int err = 0;
139 139
140 mantis = kzalloc(sizeof (struct mantis_pci), GFP_KERNEL); 140 mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
141 if (mantis == NULL) { 141 if (mantis == NULL) {
142 printk(KERN_ERR "%s ERROR: Out of memory\n", __func__); 142 printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
143 err = -ENOMEM; 143 err = -ENOMEM;
diff --git a/drivers/media/dvb/mantis/mantis_ca.c b/drivers/media/dvb/mantis/mantis_ca.c
index 88899ac96d63..2f3ba81eaa07 100644
--- a/drivers/media/dvb/mantis/mantis_ca.c
+++ b/drivers/media/dvb/mantis/mantis_ca.c
@@ -119,7 +119,7 @@ static int mantis_ts_control(struct dvb_ca_en50221 *en50221, int slot)
119 struct mantis_pci *mantis = ca->ca_priv; 119 struct mantis_pci *mantis = ca->ca_priv;
120 120
121 dprintk(MANTIS_DEBUG, 1, "Slot(%d): TS control", slot); 121 dprintk(MANTIS_DEBUG, 1, "Slot(%d): TS control", slot);
122// mantis_set_direction(mantis, 1); /* Enable TS through CAM */ 122/* mantis_set_direction(mantis, 1); */ /* Enable TS through CAM */
123 123
124 return 0; 124 return 0;
125} 125}
@@ -148,7 +148,7 @@ int mantis_ca_init(struct mantis_pci *mantis)
148 int ca_flags = 0, result; 148 int ca_flags = 0, result;
149 149
150 dprintk(MANTIS_DEBUG, 1, "Initializing Mantis CA"); 150 dprintk(MANTIS_DEBUG, 1, "Initializing Mantis CA");
151 ca = kzalloc(sizeof (struct mantis_ca), GFP_KERNEL); 151 ca = kzalloc(sizeof(struct mantis_ca), GFP_KERNEL);
152 if (!ca) { 152 if (!ca) {
153 dprintk(MANTIS_ERROR, 1, "Out of memory!, exiting .."); 153 dprintk(MANTIS_ERROR, 1, "Out of memory!, exiting ..");
154 result = -ENOMEM; 154 result = -ENOMEM;
diff --git a/drivers/media/dvb/mantis/mantis_cards.c b/drivers/media/dvb/mantis/mantis_cards.c
index f3fefbbc876f..a4250fad6ac1 100644
--- a/drivers/media/dvb/mantis/mantis_cards.c
+++ b/drivers/media/dvb/mantis/mantis_cards.c
@@ -145,7 +145,7 @@ static int __devinit mantis_pci_probe(struct pci_dev *pdev, const struct pci_dev
145 struct mantis_hwconfig *config; 145 struct mantis_hwconfig *config;
146 int err = 0; 146 int err = 0;
147 147
148 mantis = kzalloc(sizeof (struct mantis_pci), GFP_KERNEL); 148 mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
149 if (mantis == NULL) { 149 if (mantis == NULL) {
150 printk(KERN_ERR "%s ERROR: Out of memory\n", __func__); 150 printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
151 err = -ENOMEM; 151 err = -ENOMEM;
diff --git a/drivers/media/dvb/mantis/mantis_core.c b/drivers/media/dvb/mantis/mantis_core.c
index 52b3e9ebfcfa..3ddc9ba8440f 100644
--- a/drivers/media/dvb/mantis/mantis_core.c
+++ b/drivers/media/dvb/mantis/mantis_core.c
@@ -36,14 +36,16 @@ static int read_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length)
36 .flags = 0, 36 .flags = 0,
37 .buf = data, 37 .buf = data,
38 .len = 1 38 .len = 1
39 },{ 39 }, {
40 .addr = 0x50, 40 .addr = 0x50,
41 .flags = I2C_M_RD, 41 .flags = I2C_M_RD,
42 .buf = data, 42 .buf = data,
43 .len = length 43 .len = length
44 }, 44 },
45 }; 45 };
46 if ((err = i2c_transfer(&mantis->adapter, msg, 2)) < 0) { 46
47 err = i2c_transfer(&mantis->adapter, msg, 2);
48 if (err < 0) {
47 dprintk(verbose, MANTIS_ERROR, 1, 49 dprintk(verbose, MANTIS_ERROR, 1,
48 "ERROR: i2c read: < err=%i d0=0x%02x d1=0x%02x >", 50 "ERROR: i2c read: < err=%i d0=0x%02x d1=0x%02x >",
49 err, data[0], data[1]); 51 err, data[0], data[1]);
@@ -65,7 +67,8 @@ static int write_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length)
65 .len = length 67 .len = length
66 }; 68 };
67 69
68 if ((err = i2c_transfer(&mantis->adapter, &msg, 1)) < 0) { 70 err = i2c_transfer(&mantis->adapter, &msg, 1);
71 if (err < 0) {
69 dprintk(verbose, MANTIS_ERROR, 1, 72 dprintk(verbose, MANTIS_ERROR, 1,
70 "ERROR: i2c write: < err=%i length=0x%02x d0=0x%02x, d1=0x%02x >", 73 "ERROR: i2c write: < err=%i length=0x%02x d0=0x%02x, d1=0x%02x >",
71 err, length, data[0], data[1]); 74 err, length, data[0], data[1]);
@@ -81,7 +84,8 @@ static int get_mac_address(struct mantis_pci *mantis)
81 int err; 84 int err;
82 85
83 mantis->mac_address[0] = 0x08; 86 mantis->mac_address[0] = 0x08;
84 if ((err = read_eeprom_byte(mantis, &mantis->mac_address[0], 6)) < 0) { 87 err = read_eeprom_byte(mantis, &mantis->mac_address[0], 6);
88 if (err < 0) {
85 dprintk(verbose, MANTIS_ERROR, 1, "Mantis EEPROM read error"); 89 dprintk(verbose, MANTIS_ERROR, 1, "Mantis EEPROM read error");
86 90
87 return err; 91 return err;
@@ -106,25 +110,25 @@ struct mantis_hwconfig unknown_device = {
106static void mantis_load_config(struct mantis_pci *mantis) 110static void mantis_load_config(struct mantis_pci *mantis)
107{ 111{
108 switch (mantis->subsystem_device) { 112 switch (mantis->subsystem_device) {
109 case MANTIS_VP_1033_DVB_S: // VP-1033 113 case MANTIS_VP_1033_DVB_S: /* VP-1033 */
110 mantis->hwconfig = &vp1033_mantis_config; 114 mantis->hwconfig = &vp1033_mantis_config;
111 break; 115 break;
112 case MANTIS_VP_1034_DVB_S: // VP-1034 116 case MANTIS_VP_1034_DVB_S: /* VP-1034 */
113 mantis->hwconfig = &vp1034_mantis_config; 117 mantis->hwconfig = &vp1034_mantis_config;
114 break; 118 break;
115 case MANTIS_VP_1041_DVB_S2: // VP-1041 119 case MANTIS_VP_1041_DVB_S2: /* VP-1041 */
116 case TECHNISAT_SKYSTAR_HD2: 120 case TECHNISAT_SKYSTAR_HD2:
117 mantis->hwconfig = &vp1041_mantis_config; 121 mantis->hwconfig = &vp1041_mantis_config;
118 break; 122 break;
119 case MANTIS_VP_2033_DVB_C: // VP-2033 123 case MANTIS_VP_2033_DVB_C: /* VP-2033 */
120 mantis->hwconfig = &vp2033_mantis_config; 124 mantis->hwconfig = &vp2033_mantis_config;
121 break; 125 break;
122 case MANTIS_VP_2040_DVB_C: // VP-2040 126 case MANTIS_VP_2040_DVB_C: /* VP-2040 */
123 case TERRATEC_CINERGY_C_PCI: // VP-2040 clone 127 case TERRATEC_CINERGY_C_PCI: /* VP-2040 clone */
124 case TECHNISAT_CABLESTAR_HD2: 128 case TECHNISAT_CABLESTAR_HD2:
125 mantis->hwconfig = &vp2040_mantis_config; 129 mantis->hwconfig = &vp2040_mantis_config;
126 break; 130 break;
127 case MANTIS_VP_3030_DVB_T: // VP-3030 131 case MANTIS_VP_3030_DVB_T: /* VP-3030 */
128 mantis->hwconfig = &vp3030_mantis_config; 132 mantis->hwconfig = &vp3030_mantis_config;
129 break; 133 break;
130 default: 134 default:
@@ -149,23 +153,28 @@ int mantis_core_init(struct mantis_pci *mantis)
149 mantis->pdev->irq, mantis->latency, 153 mantis->pdev->irq, mantis->latency,
150 mantis->mantis_addr, mantis->mantis_mmio); 154 mantis->mantis_addr, mantis->mantis_mmio);
151 155
152 if ((err = mantis_i2c_init(mantis)) < 0) { 156 err = mantis_i2c_init(mantis);
157 if (err < 0) {
153 dprintk(verbose, MANTIS_ERROR, 1, "Mantis I2C init failed"); 158 dprintk(verbose, MANTIS_ERROR, 1, "Mantis I2C init failed");
154 return err; 159 return err;
155 } 160 }
156 if ((err = get_mac_address(mantis)) < 0) { 161 err = get_mac_address(mantis);
162 if (err < 0) {
157 dprintk(verbose, MANTIS_ERROR, 1, "get MAC address failed"); 163 dprintk(verbose, MANTIS_ERROR, 1, "get MAC address failed");
158 return err; 164 return err;
159 } 165 }
160 if ((err = mantis_dma_init(mantis)) < 0) { 166 err = mantis_dma_init(mantis);
167 if (err < 0) {
161 dprintk(verbose, MANTIS_ERROR, 1, "Mantis DMA init failed"); 168 dprintk(verbose, MANTIS_ERROR, 1, "Mantis DMA init failed");
162 return err; 169 return err;
163 } 170 }
164 if ((err = mantis_dvb_init(mantis)) < 0) { 171 err = mantis_dvb_init(mantis);
172 if (err < 0) {
165 dprintk(verbose, MANTIS_DEBUG, 1, "Mantis DVB init failed"); 173 dprintk(verbose, MANTIS_DEBUG, 1, "Mantis DVB init failed");
166 return err; 174 return err;
167 } 175 }
168 if ((err = mantis_uart_init(mantis)) < 0) { 176 err = mantis_uart_init(mantis);
177 if (err < 0) {
169 dprintk(verbose, MANTIS_DEBUG, 1, "Mantis UART init failed"); 178 dprintk(verbose, MANTIS_DEBUG, 1, "Mantis UART init failed");
170 return err; 179 return err;
171 } 180 }
@@ -191,7 +200,7 @@ int mantis_core_exit(struct mantis_pci *mantis)
191 return 0; 200 return 0;
192} 201}
193 202
194// Turn the given bit on or off. 203/* Turn the given bit on or off. */
195void gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value) 204void gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value)
196{ 205{
197 u32 cur; 206 u32 cur;
@@ -207,14 +216,15 @@ void gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value)
207 udelay(100); 216 udelay(100);
208} 217}
209 218
210//direction = 0 , no CI passthrough ; 1 , CI passthrough 219/* direction = 0 , no CI passthrough ; 1 , CI passthrough */
211void mantis_set_direction(struct mantis_pci *mantis, int direction) 220void mantis_set_direction(struct mantis_pci *mantis, int direction)
212{ 221{
213 u32 reg; 222 u32 reg;
214 223
215 reg = mmread(0x28); 224 reg = mmread(0x28);
216 dprintk(verbose, MANTIS_DEBUG, 1, "TS direction setup"); 225 dprintk(verbose, MANTIS_DEBUG, 1, "TS direction setup");
217 if (direction == 0x01) { //to CI 226 if (direction == 0x01) {
227 /* to CI */
218 reg |= 0x04; 228 reg |= 0x04;
219 mmwrite(reg, 0x28); 229 mmwrite(reg, 0x28);
220 reg &= 0xff - 0x04; 230 reg &= 0xff - 0x04;
diff --git a/drivers/media/dvb/mantis/mantis_core.h b/drivers/media/dvb/mantis/mantis_core.h
index a80939409935..8511b0cebac1 100644
--- a/drivers/media/dvb/mantis/mantis_core.h
+++ b/drivers/media/dvb/mantis/mantis_core.h
@@ -33,15 +33,15 @@
33 33
34 34
35struct vendorname { 35struct vendorname {
36 __u8 *sub_vendor_name; 36 u8 *sub_vendor_name;
37 __u32 sub_vendor_id; 37 u32 sub_vendor_id;
38}; 38};
39 39
40struct devicetype { 40struct devicetype {
41 __u8 *sub_device_name; 41 u8 *sub_device_name;
42 __u32 sub_device_id; 42 u32 sub_device_id;
43 __u8 device_type; 43 u8 device_type;
44 __u32 type_flags; 44 u32 type_flags;
45}; 45};
46 46
47 47
@@ -54,4 +54,4 @@ extern int mantis_i2c_exit(struct mantis_pci *mantis);
54extern int mantis_core_init(struct mantis_pci *mantis); 54extern int mantis_core_init(struct mantis_pci *mantis);
55extern int mantis_core_exit(struct mantis_pci *mantis); 55extern int mantis_core_exit(struct mantis_pci *mantis);
56 56
57#endif //__MANTIS_CORE_H 57#endif /* __MANTIS_CORE_H */
diff --git a/drivers/media/dvb/mantis/mantis_dma.c b/drivers/media/dvb/mantis/mantis_dma.c
index eab3645f7acb..adad1f37efde 100644
--- a/drivers/media/dvb/mantis/mantis_dma.c
+++ b/drivers/media/dvb/mantis/mantis_dma.c
@@ -43,10 +43,10 @@
43#define RISC_IRQ (0x01 << 24) 43#define RISC_IRQ (0x01 << 24)
44 44
45#define RISC_STATUS(status) ((((~status) & 0x0f) << 20) | ((status & 0x0f) << 16)) 45#define RISC_STATUS(status) ((((~status) & 0x0f) << 20) | ((status & 0x0f) << 16))
46#define RISC_FLUSH() mantis->risc_pos = 0 46#define RISC_FLUSH() (mantis->risc_pos = 0)
47#define RISC_INSTR(opcode) mantis->risc_cpu[mantis->risc_pos++] = cpu_to_le32(opcode) 47#define RISC_INSTR(opcode) (mantis->risc_cpu[mantis->risc_pos++] = cpu_to_le32(opcode))
48 48
49#define MANTIS_BUF_SIZE 64 * 1024 49#define MANTIS_BUF_SIZE (64 * 1024)
50#define MANTIS_BLOCK_BYTES (MANTIS_BUF_SIZE >> 4) 50#define MANTIS_BLOCK_BYTES (MANTIS_BUF_SIZE >> 4)
51#define MANTIS_BLOCK_COUNT (1 << 4) 51#define MANTIS_BLOCK_COUNT (1 << 4)
52#define MANTIS_RISC_SIZE PAGE_SIZE 52#define MANTIS_RISC_SIZE PAGE_SIZE
@@ -158,7 +158,8 @@ int mantis_dma_init(struct mantis_pci *mantis)
158 158
159 goto err; 159 goto err;
160 } 160 }
161 if ((err = mantis_calc_lines(mantis)) < 0) { 161 err = mantis_calc_lines(mantis);
162 if (err < 0) {
162 dprintk(MANTIS_ERROR, 1, "Mantis calc lines failed"); 163 dprintk(MANTIS_ERROR, 1, "Mantis calc lines failed");
163 164
164 goto err; 165 goto err;
@@ -248,7 +249,7 @@ void mantis_dma_xfer(unsigned long data)
248 dprintk(MANTIS_DEBUG, 1, "last block=[%d] finished block=[%d]", 249 dprintk(MANTIS_DEBUG, 1, "last block=[%d] finished block=[%d]",
249 mantis->last_block, mantis->finished_block); 250 mantis->last_block, mantis->finished_block);
250 251
251 (config->ts_size ? dvb_dmx_swfilter_204: dvb_dmx_swfilter) 252 (config->ts_size ? dvb_dmx_swfilter_204 : dvb_dmx_swfilter)
252 (&mantis->demux, &mantis->buf_cpu[mantis->last_block * MANTIS_BLOCK_BYTES], MANTIS_BLOCK_BYTES); 253 (&mantis->demux, &mantis->buf_cpu[mantis->last_block * MANTIS_BLOCK_BYTES], MANTIS_BLOCK_BYTES);
253 mantis->last_block = (mantis->last_block + 1) % MANTIS_BLOCK_COUNT; 254 mantis->last_block = (mantis->last_block + 1) % MANTIS_BLOCK_COUNT;
254 } 255 }
diff --git a/drivers/media/dvb/mantis/mantis_dvb.c b/drivers/media/dvb/mantis/mantis_dvb.c
index 54bf4ea9efd7..8982d6fdf6be 100644
--- a/drivers/media/dvb/mantis/mantis_dvb.c
+++ b/drivers/media/dvb/mantis/mantis_dvb.c
@@ -116,7 +116,6 @@ static int mantis_dvb_start_feed(struct dvb_demux_feed *dvbdmxfeed)
116 116
117 if (mantis->feeds == 1) { 117 if (mantis->feeds == 1) {
118 dprintk(MANTIS_DEBUG, 1, "mantis start feed & dma"); 118 dprintk(MANTIS_DEBUG, 1, "mantis start feed & dma");
119 printk("mantis start feed & dma\n");
120 mantis_dma_start(mantis); 119 mantis_dma_start(mantis);
121 } 120 }
122 121
@@ -137,7 +136,6 @@ static int mantis_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
137 mantis->feeds--; 136 mantis->feeds--;
138 if (mantis->feeds == 0) { 137 if (mantis->feeds == 0) {
139 dprintk(MANTIS_DEBUG, 1, "mantis stop feed and dma"); 138 dprintk(MANTIS_DEBUG, 1, "mantis stop feed and dma");
140 printk("mantis stop feed and dma\n");
141 mantis_dma_stop(mantis); 139 mantis_dma_stop(mantis);
142 } 140 }
143 141
@@ -204,9 +202,9 @@ int __devinit mantis_dvb_init(struct mantis_pci *mantis)
204 } 202 }
205 203
206 mantis->fe_mem.source = DMX_MEMORY_FE; 204 mantis->fe_mem.source = DMX_MEMORY_FE;
207 result = mantis->demux.dmx.add_frontend(&mantis->demux.dmx,&mantis->fe_mem); 205 result = mantis->demux.dmx.add_frontend(&mantis->demux.dmx, &mantis->fe_mem);
208 if (result < 0) { 206 if (result < 0) {
209 dprintk(MANTIS_ERROR, 1,"dvb_dmx_init failed, ERROR=%d", result); 207 dprintk(MANTIS_ERROR, 1, "dvb_dmx_init failed, ERROR=%d", result);
210 goto err3; 208 goto err3;
211 } 209 }
212 210
@@ -224,10 +222,6 @@ int __devinit mantis_dvb_init(struct mantis_pci *mantis)
224 dprintk(MANTIS_ERROR, 1, "!!! NO Frontends found !!!"); 222 dprintk(MANTIS_ERROR, 1, "!!! NO Frontends found !!!");
225 goto err5; 223 goto err5;
226 } else { 224 } else {
227// if (mantis->dvb_adapter == NULL) {
228// dprintk(MANTIS_ERROR, 1, "DVB adapter <NULL>");
229// goto err5;
230// }
231 if (mantis->fe == NULL) { 225 if (mantis->fe == NULL) {
232 dprintk(MANTIS_ERROR, 1, "FE <NULL>"); 226 dprintk(MANTIS_ERROR, 1, "FE <NULL>");
233 goto err5; 227 goto err5;
@@ -277,7 +271,7 @@ int __devexit mantis_dvb_exit(struct mantis_pci *mantis)
277 int err; 271 int err;
278 272
279 if (mantis->fe) { 273 if (mantis->fe) {
280// mantis_ca_exit(mantis); 274 /* mantis_ca_exit(mantis); */
281 err = mantis_frontend_shutdown(mantis); 275 err = mantis_frontend_shutdown(mantis);
282 if (err != 0) 276 if (err != 0)
283 dprintk(MANTIS_ERROR, 1, "Frontend exit while POWER ON! <%d>", err); 277 dprintk(MANTIS_ERROR, 1, "Frontend exit while POWER ON! <%d>", err);
diff --git a/drivers/media/dvb/mantis/mantis_i2c.c b/drivers/media/dvb/mantis/mantis_i2c.c
index 7bb4e78aa714..dd38b9333537 100644
--- a/drivers/media/dvb/mantis/mantis_i2c.c
+++ b/drivers/media/dvb/mantis/mantis_i2c.c
@@ -225,7 +225,7 @@ int __devinit mantis_i2c_init(struct mantis_pci *mantis)
225 225
226 init_waitqueue_head(&mantis->i2c_wq); 226 init_waitqueue_head(&mantis->i2c_wq);
227 mutex_init(&mantis->i2c_lock); 227 mutex_init(&mantis->i2c_lock);
228 strncpy(i2c_adapter->name, "Mantis I2C", sizeof (i2c_adapter->name)); 228 strncpy(i2c_adapter->name, "Mantis I2C", sizeof(i2c_adapter->name));
229 i2c_set_adapdata(i2c_adapter, mantis); 229 i2c_set_adapdata(i2c_adapter, mantis);
230 230
231 i2c_adapter->owner = THIS_MODULE; 231 i2c_adapter->owner = THIS_MODULE;
diff --git a/drivers/media/dvb/mantis/mantis_input.c b/drivers/media/dvb/mantis/mantis_input.c
index b27d7759788b..487d149c802d 100644
--- a/drivers/media/dvb/mantis/mantis_input.c
+++ b/drivers/media/dvb/mantis/mantis_input.c
@@ -36,9 +36,9 @@ static struct ir_scancode mantis_ir_table[] = {
36 { 0x29, KEY_POWER }, 36 { 0x29, KEY_POWER },
37 { 0x28, KEY_FAVORITES }, 37 { 0x28, KEY_FAVORITES },
38 { 0x30, KEY_TEXT }, 38 { 0x30, KEY_TEXT },
39 { 0x17, KEY_INFO }, // Preview 39 { 0x17, KEY_INFO }, /* Preview */
40 { 0x23, KEY_EPG }, 40 { 0x23, KEY_EPG },
41 { 0x3b, KEY_F22 },// Record List 41 { 0x3b, KEY_F22 }, /* Record List */
42 { 0x3c, KEY_1 }, 42 { 0x3c, KEY_1 },
43 { 0x3e, KEY_2 }, 43 { 0x3e, KEY_2 },
44 { 0x39, KEY_3 }, 44 { 0x39, KEY_3 },
@@ -71,22 +71,22 @@ static struct ir_scancode mantis_ir_table[] = {
71 71
72 { 0x1f, KEY_REWIND }, 72 { 0x1f, KEY_REWIND },
73 { 0x2d, KEY_FASTFORWARD }, 73 { 0x2d, KEY_FASTFORWARD },
74 { 0x1e, KEY_PREVIOUS }, // Replay |< 74 { 0x1e, KEY_PREVIOUS }, /* Replay |< */
75 { 0x1d, KEY_NEXT }, // Skip >| 75 { 0x1d, KEY_NEXT }, /* Skip >| */
76 76
77 { 0x0b, KEY_CAMERA }, // Capture 77 { 0x0b, KEY_CAMERA }, /* Capture */
78 { 0x0f, KEY_LANGUAGE }, // SAP 78 { 0x0f, KEY_LANGUAGE }, /* SAP */
79 { 0x18, KEY_MODE }, // PIP 79 { 0x18, KEY_MODE }, /* PIP */
80 { 0x12, KEY_ZOOM }, // Full screen, 80 { 0x12, KEY_ZOOM }, /* Full screen */
81 { 0x1c, KEY_SUBTITLE }, 81 { 0x1c, KEY_SUBTITLE },
82 { 0x2f, KEY_MUTE }, 82 { 0x2f, KEY_MUTE },
83 { 0x16, KEY_F20 }, // L/R, 83 { 0x16, KEY_F20 }, /* L/R */
84 { 0x38, KEY_F21 }, // Hibernate, 84 { 0x38, KEY_F21 }, /* Hibernate */
85 85
86 { 0x37, KEY_SWITCHVIDEOMODE }, // A/V 86 { 0x37, KEY_SWITCHVIDEOMODE }, /* A/V */
87 { 0x31, KEY_AGAIN }, // Recall, 87 { 0x31, KEY_AGAIN }, /* Recall */
88 { 0x1a, KEY_KPPLUS }, // Zoom+, 88 { 0x1a, KEY_KPPLUS }, /* Zoom+ */
89 { 0x19, KEY_KPMINUS }, // Zoom-, 89 { 0x19, KEY_KPMINUS }, /* Zoom- */
90 { 0x27, KEY_RED }, 90 { 0x27, KEY_RED },
91 { 0x0C, KEY_GREEN }, 91 { 0x0C, KEY_GREEN },
92 { 0x01, KEY_YELLOW }, 92 { 0x01, KEY_YELLOW },
diff --git a/drivers/media/dvb/mantis/mantis_reg.h b/drivers/media/dvb/mantis/mantis_reg.h
index 0072e149a561..c2f572b49faf 100644
--- a/drivers/media/dvb/mantis/mantis_reg.h
+++ b/drivers/media/dvb/mantis/mantis_reg.h
@@ -29,7 +29,7 @@
29#define MANTIS_INT_RISCEN (0x01 << 27) 29#define MANTIS_INT_RISCEN (0x01 << 27)
30#define MANTIS_INT_I2CRACK (0x01 << 26) 30#define MANTIS_INT_I2CRACK (0x01 << 26)
31 31
32//#define MANTIS_INT_GPIF (0xff << 12) 32/* #define MANTIS_INT_GPIF (0xff << 12) */
33 33
34#define MANTIS_INT_PCMCIA7 (0x01 << 19) 34#define MANTIS_INT_PCMCIA7 (0x01 << 19)
35#define MANTIS_INT_PCMCIA6 (0x01 << 18) 35#define MANTIS_INT_PCMCIA6 (0x01 << 18)
diff --git a/drivers/media/dvb/mantis/mantis_vp1033.c b/drivers/media/dvb/mantis/mantis_vp1033.c
index c9760b00d0ab..3c62be30bbb6 100644
--- a/drivers/media/dvb/mantis/mantis_vp1033.c
+++ b/drivers/media/dvb/mantis/mantis_vp1033.c
@@ -93,7 +93,7 @@ int lgtdqcs001f_tuner_set(struct dvb_frontend *fe,
93 u32 div; 93 u32 div;
94 94
95 95
96 struct i2c_msg msg = {.addr = 0x61, .flags = 0, .buf = buf, .len = sizeof (buf) }; 96 struct i2c_msg msg = {.addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf)};
97 97
98 div = params->frequency / 250; 98 div = params->frequency / 250;
99 99
@@ -140,12 +140,12 @@ int lgtdqcs001f_set_symbol_rate(struct dvb_frontend *fe,
140 aclk = 0xb4; 140 aclk = 0xb4;
141 bclk = 0x51; 141 bclk = 0x51;
142 } 142 }
143 stv0299_writereg (fe, 0x13, aclk); 143 stv0299_writereg(fe, 0x13, aclk);
144 stv0299_writereg (fe, 0x14, bclk); 144 stv0299_writereg(fe, 0x14, bclk);
145 145
146 stv0299_writereg (fe, 0x1f, (ratio >> 16) & 0xff); 146 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff);
147 stv0299_writereg (fe, 0x20, (ratio >> 8) & 0xff); 147 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff);
148 stv0299_writereg (fe, 0x21, (ratio ) & 0xf0); 148 stv0299_writereg(fe, 0x21, ratio & 0xf0);
149 149
150 return 0; 150 return 0;
151} 151}
diff --git a/drivers/media/dvb/mantis/mantis_vp1034.c b/drivers/media/dvb/mantis/mantis_vp1034.c
index 7ddd149b0fea..36486b53f677 100644
--- a/drivers/media/dvb/mantis/mantis_vp1034.c
+++ b/drivers/media/dvb/mantis/mantis_vp1034.c
@@ -62,7 +62,7 @@ int vp1034_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
62 dprintk(MANTIS_ERROR, 1, "Frontend (dummy) POWERDOWN"); 62 dprintk(MANTIS_ERROR, 1, "Frontend (dummy) POWERDOWN");
63 break; 63 break;
64 default: 64 default:
65 dprintk(MANTIS_ERROR, 1, "Invalid = (%d)", (u32 ) voltage); 65 dprintk(MANTIS_ERROR, 1, "Invalid = (%d)", (u32) voltage);
66 return -EINVAL; 66 return -EINVAL;
67 } 67 }
68 mmwrite(0x00, MANTIS_GPIF_DOUT); 68 mmwrite(0x00, MANTIS_GPIF_DOUT);
diff --git a/drivers/media/dvb/mantis/mantis_vp1041.c b/drivers/media/dvb/mantis/mantis_vp1041.c
index 368fc815a61d..515346dd31d0 100644
--- a/drivers/media/dvb/mantis/mantis_vp1041.c
+++ b/drivers/media/dvb/mantis/mantis_vp1041.c
@@ -44,7 +44,7 @@
44 44
45static const struct stb0899_s1_reg vp1041_stb0899_s1_init_1[] = { 45static const struct stb0899_s1_reg vp1041_stb0899_s1_init_1[] = {
46 46
47// 0x0000000b , /* SYSREG */ 47 /* 0x0000000b, *//* SYSREG */
48 { STB0899_DEV_ID , 0x30 }, 48 { STB0899_DEV_ID , 0x30 },
49 { STB0899_DISCNTRL1 , 0x32 }, 49 { STB0899_DISCNTRL1 , 0x32 },
50 { STB0899_DISCNTRL2 , 0x80 }, 50 { STB0899_DISCNTRL2 , 0x80 },
@@ -55,7 +55,7 @@ static const struct stb0899_s1_reg vp1041_stb0899_s1_init_1[] = {
55 { STB0899_DISSTATUS , 0x20 }, 55 { STB0899_DISSTATUS , 0x20 },
56 { STB0899_DISF22 , 0x99 }, 56 { STB0899_DISF22 , 0x99 },
57 { STB0899_DISF22RX , 0xa8 }, 57 { STB0899_DISF22RX , 0xa8 },
58 //SYSREG ? 58 /* SYSREG ? */
59 { STB0899_ACRPRESC , 0x11 }, 59 { STB0899_ACRPRESC , 0x11 },
60 { STB0899_ACRDIV1 , 0x0a }, 60 { STB0899_ACRDIV1 , 0x0a },
61 { STB0899_ACRDIV2 , 0x05 }, 61 { STB0899_ACRDIV2 , 0x05 },
@@ -323,9 +323,8 @@ static int vp1041_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *
323 vp1041_stb0899_config.demod_address); 323 vp1041_stb0899_config.demod_address);
324 324
325 if (stb6100_attach(mantis->fe, &vp1041_stb6100_config, adapter)) { 325 if (stb6100_attach(mantis->fe, &vp1041_stb6100_config, adapter)) {
326 if (!lnbp21_attach(mantis->fe, adapter, 0, 0)) { 326 if (!lnbp21_attach(mantis->fe, adapter, 0, 0))
327 printk("%s: No LNBP21 found!\n", __func__); 327 dprintk(MANTIS_ERROR, 1, "No LNBP21 found!");
328 }
329 } 328 }
330 } else { 329 } else {
331 return -EREMOTEIO; 330 return -EREMOTEIO;
diff --git a/drivers/media/dvb/mantis/mantis_vp2033.c b/drivers/media/dvb/mantis/mantis_vp2033.c
index 45f71749bb98..07d468ff5e13 100644
--- a/drivers/media/dvb/mantis/mantis_vp2033.c
+++ b/drivers/media/dvb/mantis/mantis_vp2033.c
@@ -71,7 +71,7 @@ static int tda1002x_cu1216_tuner_set(struct dvb_frontend *fe, struct dvb_fronten
71 struct i2c_adapter *adapter = &mantis->adapter; 71 struct i2c_adapter *adapter = &mantis->adapter;
72 72
73 u8 buf[6]; 73 u8 buf[6];
74 struct i2c_msg msg = {.addr = 0x60, .flags = 0, .buf = buf, .len = sizeof (buf) }; 74 struct i2c_msg msg = {.addr = 0x60, .flags = 0, .buf = buf, .len = sizeof(buf)};
75 int i; 75 int i;
76 76
77#define CU1216_IF 36125000 77#define CU1216_IF 36125000
diff --git a/drivers/media/dvb/mantis/mantis_vp2040.c b/drivers/media/dvb/mantis/mantis_vp2040.c
index 8471bff672f3..a7ca233e800b 100644
--- a/drivers/media/dvb/mantis/mantis_vp2040.c
+++ b/drivers/media/dvb/mantis/mantis_vp2040.c
@@ -53,7 +53,7 @@ static int tda1002x_cu1216_tuner_set(struct dvb_frontend *fe, struct dvb_fronten
53 struct i2c_adapter *adapter = &mantis->adapter; 53 struct i2c_adapter *adapter = &mantis->adapter;
54 54
55 u8 buf[6]; 55 u8 buf[6];
56 struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = buf,.len = sizeof (buf) }; 56 struct i2c_msg msg = {.addr = 0x60, .flags = 0, .buf = buf, .len = sizeof(buf)};
57 int i; 57 int i;
58 58
59#define CU1216_IF 36125000 59#define CU1216_IF 36125000