diff mbox

[v4,1/2] soc: qcom: smd: Introduce compile stubs

Message ID 1462543748-29187-1-git-send-email-bjorn.andersson@linaro.org
State Accepted
Commit 43315f31adc2bf3b35e04dcf2372c3bb08014ed1
Headers show

Commit Message

Bjorn Andersson May 6, 2016, 2:09 p.m. UTC
Introduce compile stubs for the SMD API, allowing consumers to be
compile tested.

Acked-by: Andy Gross <andy.gross@linaro.org>

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

---

Changes since v3:
- None

Changes since v2:
- Introduce this patch, to allow compile testing of QRTR_SMD

 include/linux/soc/qcom/smd.h | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller May 9, 2016, 3:47 a.m. UTC | #1
From: Bjorn Andersson <bjorn.andersson@linaro.org>

Date: Fri,  6 May 2016 07:09:08 -0700

> From: Courtney Cavin <courtney.cavin@sonymobile.com>

> 

> Add an implementation of Qualcomm's IPC router protocol, used to

> communicate with service providing remote processors.

> 

> Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>

> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>

> [bjorn: Cope with 0 being a valid node id and implement RTM_NEWADDR]

> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>


Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h
index d0cb6d189a0a..46a984f5e3a3 100644
--- a/include/linux/soc/qcom/smd.h
+++ b/include/linux/soc/qcom/smd.h
@@ -45,13 +45,39 @@  struct qcom_smd_driver {
 	int (*callback)(struct qcom_smd_device *, const void *, size_t);
 };
 
+#if IS_ENABLED(CONFIG_QCOM_SMD)
+
 int qcom_smd_driver_register(struct qcom_smd_driver *drv);
 void qcom_smd_driver_unregister(struct qcom_smd_driver *drv);
 
+int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len);
+
+#else
+
+static inline int qcom_smd_driver_register(struct qcom_smd_driver *drv)
+{
+	return -ENXIO;
+}
+
+static inline void qcom_smd_driver_unregister(struct qcom_smd_driver *drv)
+{
+	/* This shouldn't be possible */
+	WARN_ON(1);
+}
+
+static inline int qcom_smd_send(struct qcom_smd_channel *channel,
+				const void *data, int len)
+{
+	/* This shouldn't be possible */
+	WARN_ON(1);
+	return -ENXIO;
+}
+
+#endif
+
 #define module_qcom_smd_driver(__smd_driver) \
 	module_driver(__smd_driver, qcom_smd_driver_register, \
 		      qcom_smd_driver_unregister)
 
-int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len);
 
 #endif