summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorManu Abraham <devnull@localhost>2005-09-21 16:35:13 +0000
committerManu Abraham <devnull@localhost>2005-09-21 16:35:13 +0000
commitc639ab0356b57381534d80765ea7471d3a479038 (patch)
tree187ae55e41b5fb8947926133f123241c0cdbf7a1 /linux/drivers/media
parent7f621d710a79176101b7a7a866c2792a942ba95d (diff)
downloadmediapointer-dvb-s2-c639ab0356b57381534d80765ea7471d3a479038.tar.gz
mediapointer-dvb-s2-c639ab0356b57381534d80765ea7471d3a479038.tar.bz2
remove redundant checksum
- 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>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst_ca.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst_ca.c b/linux/drivers/media/dvb/bt8xx/dst_ca.c
index d4831c374..34394aa70 100644
--- a/linux/drivers/media/dvb/bt8xx/dst_ca.c
+++ b/linux/drivers/media/dvb/bt8xx/dst_ca.c
@@ -69,26 +69,12 @@ static int ca_set_pid(void)
}
-static int put_checksum(u8 *check_string, int length)
+static void put_checksum(u8 *check_string, int length)
{
- u8 i = 0, checksum = 0;
-
- dprintk(verbose, DST_CA_DEBUG, 1, " ========================= Checksum calculation ===========================");
- dprintk(verbose, DST_CA_DEBUG, 1, " String Length=[0x%02x]", length);
- dprintk(verbose, DST_CA_DEBUG, 1, " String=[");
-
- while (i < length) {
- dprintk(verbose, DST_CA_DEBUG, 0, " %02x", check_string[i]);
- checksum += check_string[i];
- i++;
- }
- dprintk(verbose, DST_CA_DEBUG, 0, " ]\n");
- dprintk(verbose, DST_CA_DEBUG, 1, "Sum=[%02x]\n", checksum);
- check_string[length] = ~checksum + 1;
- dprintk(verbose, DST_CA_DEBUG, 1, " Checksum=[%02x]", check_string[length]);
- dprintk(verbose, DST_CA_DEBUG, 1, " ==========================================================================");
-
- return 0;
+ dprintk(verbose, DST_CA_DEBUG, 1, " Computing string checksum.");
+ dprintk(verbose, DST_CA_DEBUG, 1, " -> string length : 0x%02x", length);
+ check_string[length] = dst_check_sum (check_string, length);
+ dprintk(verbose, DST_CA_DEBUG, 1, " -> checksum : 0x%02x", check_string[length]);
}
static int dst_ci_command(struct dst_state* state, u8 * data, u8 *ca_string, u8 len, int read)