Loading drivers/soc/qcom/Kconfig +2 −2 Original line number Diff line number Diff line Loading @@ -100,8 +100,8 @@ config QCOM_PM low power modes. config QCOM_QMI_HELPERS tristate depends on ARCH_QCOM && NET bool "QTI QMI Helpers" depends on QRTR help Helper library for handling QMI encoded messages. QMI encoded messages are used in communication between the majority of QRTR Loading drivers/soc/qcom/qmi_interface.c +6 −6 Original line number Diff line number Diff line Loading @@ -318,7 +318,7 @@ int qmi_txn_init(struct qmi_handle *qmi, struct qmi_txn *txn, txn->dest = c_struct; mutex_lock(&qmi->txn_lock); ret = idr_alloc_cyclic(&qmi->txns, txn, 0, INT_MAX, GFP_KERNEL); ret = idr_alloc_cyclic(&qmi->txns, txn, 0, U16_MAX, GFP_KERNEL); if (ret < 0) pr_err("failed to allocate transaction id\n"); Loading @@ -345,8 +345,7 @@ int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout) struct qmi_handle *qmi = txn->qmi; int ret; ret = wait_for_completion_interruptible_timeout(&txn->completion, timeout); ret = wait_for_completion_timeout(&txn->completion, timeout); mutex_lock(&qmi->txn_lock); mutex_lock(&txn->lock); Loading @@ -354,9 +353,7 @@ int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout) mutex_unlock(&txn->lock); mutex_unlock(&qmi->txn_lock); if (ret < 0) return ret; else if (ret == 0) if (ret == 0) return -ETIMEDOUT; else return txn->result; Loading Loading @@ -480,6 +477,9 @@ static void qmi_handle_message(struct qmi_handle *qmi, struct qmi_txn *txn = NULL; int ret; if (!len) return; if (len < sizeof(*hdr)) { pr_err("ignoring short QMI packet\n"); return; Loading include/linux/soc/qcom/qmi.h +2 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2014, 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2017, Linaro Ltd. */ #ifndef __QMI_HELPERS_H__ Loading Loading @@ -166,7 +166,7 @@ struct qmi_ops { struct qmi_txn { struct qmi_handle *qmi; int id; u16 id; struct mutex lock; struct completion completion; Loading Loading
drivers/soc/qcom/Kconfig +2 −2 Original line number Diff line number Diff line Loading @@ -100,8 +100,8 @@ config QCOM_PM low power modes. config QCOM_QMI_HELPERS tristate depends on ARCH_QCOM && NET bool "QTI QMI Helpers" depends on QRTR help Helper library for handling QMI encoded messages. QMI encoded messages are used in communication between the majority of QRTR Loading
drivers/soc/qcom/qmi_interface.c +6 −6 Original line number Diff line number Diff line Loading @@ -318,7 +318,7 @@ int qmi_txn_init(struct qmi_handle *qmi, struct qmi_txn *txn, txn->dest = c_struct; mutex_lock(&qmi->txn_lock); ret = idr_alloc_cyclic(&qmi->txns, txn, 0, INT_MAX, GFP_KERNEL); ret = idr_alloc_cyclic(&qmi->txns, txn, 0, U16_MAX, GFP_KERNEL); if (ret < 0) pr_err("failed to allocate transaction id\n"); Loading @@ -345,8 +345,7 @@ int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout) struct qmi_handle *qmi = txn->qmi; int ret; ret = wait_for_completion_interruptible_timeout(&txn->completion, timeout); ret = wait_for_completion_timeout(&txn->completion, timeout); mutex_lock(&qmi->txn_lock); mutex_lock(&txn->lock); Loading @@ -354,9 +353,7 @@ int qmi_txn_wait(struct qmi_txn *txn, unsigned long timeout) mutex_unlock(&txn->lock); mutex_unlock(&qmi->txn_lock); if (ret < 0) return ret; else if (ret == 0) if (ret == 0) return -ETIMEDOUT; else return txn->result; Loading Loading @@ -480,6 +477,9 @@ static void qmi_handle_message(struct qmi_handle *qmi, struct qmi_txn *txn = NULL; int ret; if (!len) return; if (len < sizeof(*hdr)) { pr_err("ignoring short QMI packet\n"); return; Loading
include/linux/soc/qcom/qmi.h +2 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2014, 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2017, Linaro Ltd. */ #ifndef __QMI_HELPERS_H__ Loading Loading @@ -166,7 +166,7 @@ struct qmi_ops { struct qmi_txn { struct qmi_handle *qmi; int id; u16 id; struct mutex lock; struct completion completion; Loading