summaryrefslogtreecommitdiffstats
path: root/include/linux/soc
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@sonymobile.com>2016-02-17 22:39:02 -0800
committerAndy Gross <andy.gross@linaro.org>2016-03-30 17:20:43 -0500
commit39f0db298e7c02a29371fb39cabdd5d76e6b726c (patch)
tree507cdce82c8ca4ded472546639da6b3427962d30 /include/linux/soc
parent3b904b046c7adfbadb124851c7a23276f7187ddb (diff)
downloadlinux-39f0db298e7c02a29371fb39cabdd5d76e6b726c.tar.gz
linux-39f0db298e7c02a29371fb39cabdd5d76e6b726c.tar.bz2
linux-39f0db298e7c02a29371fb39cabdd5d76e6b726c.zip
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> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'include/linux/soc')
-rw-r--r--include/linux/soc/qcom/smd.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h
index d0cb6d189a0a..65a64fcdb1aa 100644
--- a/include/linux/soc/qcom/smd.h
+++ b/include/linux/soc/qcom/smd.h
@@ -26,6 +26,8 @@ struct qcom_smd_device {
struct qcom_smd_channel *channel;
};
+typedef int (*qcom_smd_cb_t)(struct qcom_smd_device *, const void *, size_t);
+
/**
* struct qcom_smd_driver - smd driver struct
* @driver: underlying device driver
@@ -42,7 +44,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);