qcom-scm: fix endianess issue in __qcom_scm_is_call_available
authorRob Clark <robdclark@gmail.com>
Tue, 29 Sep 2015 19:48:53 +0000 (15:48 -0400)
committerAndy Gross <agross@codeaurora.org>
Wed, 14 Oct 2015 19:51:21 +0000 (14:51 -0500)
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
drivers/firmware/qcom_scm-32.c

index 29e6850665eb344cbbc946273343ec13cef81e12..0883292f640f4d512c8b198d90a65ed945c02f87 100644 (file)
@@ -480,15 +480,15 @@ void __qcom_scm_cpu_power_down(u32 flags)
 int __qcom_scm_is_call_available(u32 svc_id, u32 cmd_id)
 {
        int ret;
-       u32 svc_cmd = (svc_id << 10) | cmd_id;
-       u32 ret_val = 0;
+       __le32 svc_cmd = cpu_to_le32((svc_id << 10) | cmd_id);
+       __le32 ret_val = 0;
 
        ret = qcom_scm_call(QCOM_SCM_SVC_INFO, QCOM_IS_CALL_AVAIL_CMD, &svc_cmd,
                        sizeof(svc_cmd), &ret_val, sizeof(ret_val));
        if (ret)
                return ret;
 
-       return ret_val;
+       return le32_to_cpu(ret_val);
 }
 
 int __qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, u32 *resp)