aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom/qmi_interface.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-11 21:19:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-11 21:19:45 -0400
commit8efcf34a263965e471e3999904f94d1f6799d42a (patch)
treea1fe88517cb8a4eb54b50c3ce32eaa1954518b9c /drivers/soc/qcom/qmi_interface.c
parent32bcbf8b6d09428907fd045a4ea90562ec7dc4a2 (diff)
parent14321604c82c5415a72e894b83b587a345f5bdf2 (diff)
Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC late updates from Olof Johansson: "This is a branch with a few merge requests that either came in late, or took a while longer for us to review and merge than usual and thus cut it a bit close to the merge window. We stage them in a separate branch and if things look good, we still send them up -- and that's the case here. This is mostly DT additions for Renesas platforms, adding IP block descriptions for existing and new SoCs. There are also some driver updates for Qualcomm platforms for SMEM/QMI and GENI, which is their generalized serial protocol interface" * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (186 commits) soc: qcom: smem: introduce qcom_smem_virt_to_phys() soc: qcom: qmi: fix a buffer sizing bug MAINTAINERS: Update pattern for qcom_scm soc: Unconditionally include qcom Makefile soc: qcom: smem: check sooner in qcom_smem_set_global_partition() soc: qcom: smem: fix qcom_smem_set_global_partition() soc: qcom: smem: fix off-by-one error in qcom_smem_alloc_private() soc: qcom: smem: byte swap values properly soc: qcom: smem: return proper type for cached entry functions soc: qcom: smem: fix first cache entry calculation soc: qcom: cmd-db: Make endian-agnostic drivers: qcom: add command DB driver arm64: dts: renesas: salvator-common: Add ADV7482 support ARM: dts: r8a7740: Add CEU1 ARM: dts: r8a7740: Add CEU0 arm64: dts: renesas: salvator-common: enable VIN arm64: dts: renesas: r8a77970: add VIN and CSI-2 nodes arm64: dts: renesas: r8a77965: add VIN and CSI-2 nodes arm64: dts: renesas: r8a7796: add VIN and CSI-2 nodes arm64: dts: renesas: r8a7795-es1: add CSI-2 node ...
Diffstat (limited to 'drivers/soc/qcom/qmi_interface.c')
-rw-r--r--drivers/soc/qcom/qmi_interface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/soc/qcom/qmi_interface.c b/drivers/soc/qcom/qmi_interface.c
index 321982277697..938ca41c56cd 100644
--- a/drivers/soc/qcom/qmi_interface.c
+++ b/drivers/soc/qcom/qmi_interface.c
@@ -639,10 +639,11 @@ int qmi_handle_init(struct qmi_handle *qmi, size_t recv_buf_size,
639 if (ops) 639 if (ops)
640 qmi->ops = *ops; 640 qmi->ops = *ops;
641 641
642 /* Make room for the header */
643 recv_buf_size += sizeof(struct qmi_header);
644 /* Must also be sufficient to hold a control packet */
642 if (recv_buf_size < sizeof(struct qrtr_ctrl_pkt)) 645 if (recv_buf_size < sizeof(struct qrtr_ctrl_pkt))
643 recv_buf_size = sizeof(struct qrtr_ctrl_pkt); 646 recv_buf_size = sizeof(struct qrtr_ctrl_pkt);
644 else
645 recv_buf_size += sizeof(struct qmi_header);
646 647
647 qmi->recv_buf_size = recv_buf_size; 648 qmi->recv_buf_size = recv_buf_size;
648 qmi->recv_buf = kzalloc(recv_buf_size, GFP_KERNEL); 649 qmi->recv_buf = kzalloc(recv_buf_size, GFP_KERNEL);