提交 43315f31 编写于 作者: B Bjorn Andersson 提交者: David S. Miller

soc: qcom: smd: Introduce compile stubs

Introduce compile stubs for the SMD API, allowing consumers to be
compile tested.
Acked-by: NAndy Gross <andy.gross@linaro.org>
Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 218d48e7
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册