diff options
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/service-locator.c | 9 | ||||
-rw-r--r-- | drivers/soc/qcom/service-notifier.c | 21 |
2 files changed, 13 insertions, 17 deletions
diff --git a/drivers/soc/qcom/service-locator.c b/drivers/soc/qcom/service-locator.c index 97cd11201262..f19db5fe99b3 100644 --- a/drivers/soc/qcom/service-locator.c +++ b/drivers/soc/qcom/service-locator.c @@ -31,7 +31,6 @@ #define SERVREG_LOC_SERVICE_INSTANCE_ID 1 -#define QMI_RESP_BIT_SHIFT(x) (x << 16) #define QMI_SERVREG_LOC_SERVER_INITIAL_TIMEOUT 2000 #define QMI_SERVREG_LOC_SERVER_TIMEOUT 2000 #define INITIAL_TIMEOUT 100000 @@ -199,9 +198,9 @@ static int servreg_loc_send_msg(struct msg_desc *req_desc, } /* Check the response */ - if (QMI_RESP_BIT_SHIFT(resp->resp.result) != QMI_RESULT_SUCCESS_V01) { + if (resp->resp.result != QMI_RESULT_SUCCESS_V01) { pr_err("QMI request for client %s failed 0x%x\n", - pd->client_name, QMI_RESP_BIT_SHIFT(resp->resp.error)); + pd->client_name, resp->resp.error); return -EREMOTEIO; } return rc; @@ -220,7 +219,7 @@ static int service_locator_send_msg(struct pd_qmi_client_data *pd) return -EAGAIN; } - req = kmalloc(sizeof( + req = kzalloc(sizeof( struct qmi_servreg_loc_get_domain_list_req_msg_v01), GFP_KERNEL); if (!req) { @@ -228,7 +227,7 @@ static int service_locator_send_msg(struct pd_qmi_client_data *pd) rc = -ENOMEM; goto out; } - resp = kmalloc(sizeof( + resp = kzalloc(sizeof( struct qmi_servreg_loc_get_domain_list_resp_msg_v01), GFP_KERNEL); if (!resp) { diff --git a/drivers/soc/qcom/service-notifier.c b/drivers/soc/qcom/service-notifier.c index b5681a5c6817..221ae0c1fefb 100644 --- a/drivers/soc/qcom/service-notifier.c +++ b/drivers/soc/qcom/service-notifier.c @@ -30,7 +30,6 @@ #include <soc/qcom/service-notifier.h> #include "service-notifier-private.h" -#define QMI_RESP_BIT_SHIFT(x) (x << 16) #define SERVREG_NOTIF_NAME_LENGTH QMI_SERVREG_NOTIF_NAME_LENGTH_V01 #define SERVREG_NOTIF_SERVICE_ID SERVREG_NOTIF_SERVICE_ID_V01 #define SERVREG_NOTIF_SERVICE_VERS SERVREG_NOTIF_SERVICE_VERS_V01 @@ -225,9 +224,8 @@ static void send_ind_ack(struct work_struct *work) } /* Check the response */ - if (QMI_RESP_BIT_SHIFT(resp.resp.result) != QMI_RESULT_SUCCESS_V01) - pr_err("QMI request failed 0x%x\n", - QMI_RESP_BIT_SHIFT(resp.resp.error)); + if (resp.resp.result != QMI_RESULT_SUCCESS_V01) + pr_err("QMI request failed 0x%x\n", resp.resp.error); pr_info("Indication ACKed for transid %d, service %s, instance %d!\n", data->ind_msg.transaction_id, data->ind_msg.service_path, data->instance_id); @@ -318,9 +316,8 @@ static int send_notif_listener_msg_req(struct service_notif_info *service_notif, } /* Check the response */ - if (QMI_RESP_BIT_SHIFT(resp.resp.result) != QMI_RESULT_SUCCESS_V01) { - pr_err("QMI request failed 0x%x\n", - QMI_RESP_BIT_SHIFT(resp.resp.error)); + if (resp.resp.result != QMI_RESULT_SUCCESS_V01) { + pr_err("QMI request failed 0x%x\n", resp.resp.error); return -EREMOTEIO; } @@ -645,15 +642,15 @@ static int send_pd_restart_req(const char *service_path, } /* Check response if PDR is disabled */ - if (QMI_RESP_BIT_SHIFT(resp.resp.result) == QMI_ERR_DISABLED_V01) { - pr_err("PD restart is disabled 0x%x\n", - QMI_RESP_BIT_SHIFT(resp.resp.error)); + if (resp.resp.result == QMI_RESULT_FAILURE_V01 && + resp.resp.error == QMI_ERR_DISABLED_V01) { + pr_err("PD restart is disabled 0x%x\n", resp.resp.error); return -EOPNOTSUPP; } /* Check the response for other error case*/ - if (QMI_RESP_BIT_SHIFT(resp.resp.result) != QMI_RESULT_SUCCESS_V01) { + if (resp.resp.result != QMI_RESULT_SUCCESS_V01) { pr_err("QMI request for PD restart failed 0x%x\n", - QMI_RESP_BIT_SHIFT(resp.resp.error)); + resp.resp.error); return -EREMOTEIO; } |