summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorAvaneesh Kumar Dwivedi <akdwived@codeaurora.org>2016-10-26 14:06:34 +0530
committerPuja Gupta <pujag@codeaurora.org>2016-11-10 15:24:37 -0800
commitedf9249e94a0a3e855d9f3145e2a8b35387e4787 (patch)
tree4f8d40e56e472071fd1670903cddf2a26717bae8 /drivers/soc
parente95375540c79e0d0b48953141559fec4b6bcbf96 (diff)
soc: qcom: Replace ARRAY_SIZE macro with strlen
ARRAY_SIZE returns size of array. While sending command string we need to only pass size of actual command string, hence use strlen in place of ARRAY_SIZE. Change-Id: If0afc6b1209b03ae17472a17b34d9d403757bfd0 Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/sysmon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/soc/qcom/sysmon.c b/drivers/soc/qcom/sysmon.c
index 8a12341a6f91..f8d0f10b1173 100644
--- a/drivers/soc/qcom/sysmon.c
+++ b/drivers/soc/qcom/sysmon.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2014,2016 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -206,7 +206,7 @@ int sysmon_send_shutdown_no_qmi(struct subsys_desc *dest_desc)
return -ENODEV;
mutex_lock(&ss->lock);
- ret = sysmon_send_msg(ss, tx_buf, ARRAY_SIZE(tx_buf));
+ ret = sysmon_send_msg(ss, tx_buf, strlen(tx_buf));
if (ret) {
pr_err("Message sending failed %d\n", ret);
goto out;
@@ -257,7 +257,7 @@ int sysmon_get_reason_no_qmi(struct subsys_desc *dest_desc,
return -ENODEV;
mutex_lock(&ss->lock);
- ret = sysmon_send_msg(ss, tx_buf, ARRAY_SIZE(tx_buf));
+ ret = sysmon_send_msg(ss, tx_buf, strlen(tx_buf));
if (ret) {
pr_err("Message sending failed %d\n", ret);
goto out;