Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: qcom: smem_state: Add stubs for disabled smem_state

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>

authored by

Bjorn Andersson and committed by
Andy Gross
e8b123e6 39a3366a

+35
+35
include/linux/soc/qcom/smem_state.h
··· 1 1 #ifndef __QCOM_SMEM_STATE__ 2 2 #define __QCOM_SMEM_STATE__ 3 3 4 + #include <linux/errno.h> 5 + 6 + struct device_node; 4 7 struct qcom_smem_state; 5 8 6 9 struct qcom_smem_state_ops { 7 10 int (*update_bits)(void *, u32, u32); 8 11 }; 12 + 13 + #ifdef CONFIG_QCOM_SMEM_STATE 9 14 10 15 struct qcom_smem_state *qcom_smem_state_get(struct device *dev, const char *con_id, unsigned *bit); 11 16 void qcom_smem_state_put(struct qcom_smem_state *); ··· 19 14 20 15 struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, const struct qcom_smem_state_ops *ops, void *data); 21 16 void qcom_smem_state_unregister(struct qcom_smem_state *state); 17 + 18 + #else 19 + 20 + static inline struct qcom_smem_state *qcom_smem_state_get(struct device *dev, 21 + const char *con_id, unsigned *bit) 22 + { 23 + return ERR_PTR(-EINVAL); 24 + } 25 + 26 + static inline void qcom_smem_state_put(struct qcom_smem_state *state) 27 + { 28 + } 29 + 30 + static inline int qcom_smem_state_update_bits(struct qcom_smem_state *state, 31 + u32 mask, u32 value) 32 + { 33 + return -EINVAL; 34 + } 35 + 36 + static inline struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, 37 + const struct qcom_smem_state_ops *ops, void *data) 38 + { 39 + return ERR_PTR(-EINVAL); 40 + } 41 + 42 + static inline void qcom_smem_state_unregister(struct qcom_smem_state *state) 43 + { 44 + } 45 + 46 + #endif 22 47 23 48 #endif