aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-19 07:55:20 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-19 08:09:01 -0200
commit2c096b74b3febd3aaf2f9325c870369071e3f745 (patch)
tree83a29fc7110ee57f1c558bf587108e819fd2fcbb
parentd8f8640e89809b19fd2546d23361752e8364e410 (diff)
parse_af9035.pl: Fix size on rd/wr regs prints
We need to discard the packet headers when printing the length. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rwxr-xr-xcontrib/af9035/parse_af9035.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/af9035/parse_af9035.pl b/contrib/af9035/parse_af9035.pl
index 31b888b7..32ebacb2 100755
--- a/contrib/af9035/parse_af9035.pl
+++ b/contrib/af9035/parse_af9035.pl
@@ -197,7 +197,7 @@ sub print_send_recv($$$$$$)
my $comment = "\t/* $payload */" if ($payload =~ /ERROR/);
if (scalar(@ctrl_bytes) > 1) {
- printf "ret = af9035_wr_regs(d, 0x%04x, $ctrl_len, { $ctrl_pay });$comment\n", $reg;
+ printf "ret = af9035_wr_regs(d, 0x%04x, %d, { $ctrl_pay });$comment\n", $reg, scalar(@ctrl_bytes);
} else {
printf "ret = af9035_wr_reg(d, 0x%04x, $ctrl_pay);$comment\n", $reg;
}
@@ -205,7 +205,7 @@ sub print_send_recv($$$$$$)
} else {
my $comment = "\t/* read: $payload */";
if (scalar(@ctrl_bytes) > 0) {
- printf "ret = af9035_rd_regs(d, 0x%04x, $ctrl_len, { $ctrl_pay }, $len, rbuf);$comment\n", $reg;
+ printf "ret = af9035_rd_regs(d, 0x%04x, %d, { $ctrl_pay }, $len, rbuf);$comment\n", $reg, scalar(@ctrl_bytes);
} else {
printf "ret = af9035_rd_reg(d, 0x%04x, &val);$comment\n", $reg;
}

Privacy Policy