diff options
author | Perceval Anichini <perceval.anichini@streamvision.fr> | 2005-11-09 00:35:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:02 -0500 |
commit | 4fbbc7ee591ab19707d12e2f86a1ae11f7195423 (patch) | |
tree | 7c57b11183346325174ba5d278ad95efc9edcfeb /drivers/media/dvb/bt8xx/dst_ca.c | |
parent | f5648e8a68daec5fd1c42c1500c662967adb8f6c (diff) |
[PATCH] dvb: dst: remove redundant checksum calculation
removes the redundant checksum calculation, which was also exported from the
dst.c module
Signed-off-by: Perceval Anichini <perceval.anichini@streamvision.fr>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/bt8xx/dst_ca.c')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst_ca.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/media/dvb/bt8xx/dst_ca.c b/drivers/media/dvb/bt8xx/dst_ca.c index f77fda77b638..16645e06dea2 100644 --- a/drivers/media/dvb/bt8xx/dst_ca.c +++ b/drivers/media/dvb/bt8xx/dst_ca.c | |||
@@ -69,26 +69,12 @@ static int ca_set_pid(void) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | static int put_checksum(u8 *check_string, int length) | 72 | static void put_checksum(u8 *check_string, int length) |
73 | { | 73 | { |
74 | u8 i = 0, checksum = 0; | 74 | dprintk(verbose, DST_CA_DEBUG, 1, " Computing string checksum."); |
75 | 75 | dprintk(verbose, DST_CA_DEBUG, 1, " -> string length : 0x%02x", length); | |
76 | dprintk(verbose, DST_CA_DEBUG, 1, " ========================= Checksum calculation ==========================="); | 76 | check_string[length] = dst_check_sum (check_string, length); |
77 | dprintk(verbose, DST_CA_DEBUG, 1, " String Length=[0x%02x]", length); | 77 | dprintk(verbose, DST_CA_DEBUG, 1, " -> checksum : 0x%02x", check_string[length]); |
78 | dprintk(verbose, DST_CA_DEBUG, 1, " String=["); | ||
79 | |||
80 | while (i < length) { | ||
81 | dprintk(verbose, DST_CA_DEBUG, 0, " %02x", check_string[i]); | ||
82 | checksum += check_string[i]; | ||
83 | i++; | ||
84 | } | ||
85 | dprintk(verbose, DST_CA_DEBUG, 0, " ]\n"); | ||
86 | dprintk(verbose, DST_CA_DEBUG, 1, "Sum=[%02x]\n", checksum); | ||
87 | check_string[length] = ~checksum + 1; | ||
88 | dprintk(verbose, DST_CA_DEBUG, 1, " Checksum=[%02x]", check_string[length]); | ||
89 | dprintk(verbose, DST_CA_DEBUG, 1, " =========================================================================="); | ||
90 | |||
91 | return 0; | ||
92 | } | 78 | } |
93 | 79 | ||
94 | static int dst_ci_command(struct dst_state* state, u8 * data, u8 *ca_string, u8 len, int read) | 80 | static int dst_ci_command(struct dst_state* state, u8 * data, u8 *ca_string, u8 len, int read) |