aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@sonymobile.com>2015-10-20 10:42:56 +0800
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2015-11-17 16:54:36 +0000
commit7f3b82336c0cda63fec1ad5ee57b7abb0adf202f (patch)
tree0e0de08075b709f6c4e259a492606b6b072af9b9 /include
parentf7717639225c88a9de518598268795aca5114e41 (diff)
soc: qcom: smd: Introduce callback setter
Introduce a setter for the callback function pointer to clarify the locking around the operation and to reduce some duplication. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/soc/qcom/smd.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h
index a2fe0372d205..4013fd67338e 100644
--- a/include/linux/soc/qcom/smd.h
+++ b/include/linux/soc/qcom/smd.h
@@ -6,7 +6,9 @@
struct qcom_smd;
struct qcom_smd_lookup;
+struct qcom_smd_device;
+typedef int (*qcom_smd_cb_t)(struct qcom_smd_device *, const void *, size_t);
/*
* SMD channel states.
@@ -44,7 +46,7 @@ struct qcom_smd_channel {
int fifo_size;
void *bounce_buffer;
- int (*cb)(struct qcom_smd_device *, const void *, size_t);
+ qcom_smd_cb_t cb;
spinlock_t recv_lock;
@@ -87,7 +89,7 @@ struct qcom_smd_driver {
int (*probe)(struct qcom_smd_device *dev);
void (*remove)(struct qcom_smd_device *dev);
- int (*callback)(struct qcom_smd_device *, const void *, size_t);
+ qcom_smd_cb_t callback;
};
int qcom_smd_driver_register(struct qcom_smd_driver *drv);