msm: sysmon: Send only strlen(tx_buf) instead of ARRAY_SIZE(tx_buf)
The data in tx_buf is always a NUL-terminated string. Instead of
sending the full 50 byte buffer to the destination subsystem,
send only the length of the string.
Change-Id: Ib0f3a14f4c5cb76c4f1027c8b6018d07bb487fa5
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/sysmon.c b/arch/arm/mach-msm/sysmon.c
index ddb8502..679393d 100644
--- a/arch/arm/mach-msm/sysmon.c
+++ b/arch/arm/mach-msm/sysmon.c
@@ -111,10 +111,10 @@
mutex_lock(&ss->lock);
switch (ss->transport) {
case TRANSPORT_SMD:
- ret = sysmon_send_smd(ss, tx_buf, ARRAY_SIZE(tx_buf));
+ ret = sysmon_send_smd(ss, tx_buf, strlen(tx_buf));
break;
case TRANSPORT_HSIC:
- ret = sysmon_send_hsic(ss, tx_buf, ARRAY_SIZE(tx_buf));
+ ret = sysmon_send_hsic(ss, tx_buf, strlen(tx_buf));
break;
default:
ret = -EINVAL;