diff options
author | Bjorn Andersson <bjorn.andersson@sonymobile.com> | 2016-02-18 01:39:02 -0500 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2016-03-30 18:20:43 -0400 |
commit | 39f0db298e7c02a29371fb39cabdd5d76e6b726c (patch) | |
tree | 507cdce82c8ca4ded472546639da6b3427962d30 /include/linux | |
parent | 3b904b046c7adfbadb124851c7a23276f7187ddb (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>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/soc/qcom/smd.h | 4 |
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 { | |||
26 | struct qcom_smd_channel *channel; | 26 | struct qcom_smd_channel *channel; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | typedef int (*qcom_smd_cb_t)(struct qcom_smd_device *, const void *, size_t); | ||
30 | |||
29 | /** | 31 | /** |
30 | * struct qcom_smd_driver - smd driver struct | 32 | * struct qcom_smd_driver - smd driver struct |
31 | * @driver: underlying device driver | 33 | * @driver: underlying device driver |
@@ -42,7 +44,7 @@ struct qcom_smd_driver { | |||
42 | 44 | ||
43 | int (*probe)(struct qcom_smd_device *dev); | 45 | int (*probe)(struct qcom_smd_device *dev); |
44 | void (*remove)(struct qcom_smd_device *dev); | 46 | void (*remove)(struct qcom_smd_device *dev); |
45 | int (*callback)(struct qcom_smd_device *, const void *, size_t); | 47 | qcom_smd_cb_t callback; |
46 | }; | 48 | }; |
47 | 49 | ||
48 | int qcom_smd_driver_register(struct qcom_smd_driver *drv); | 50 | int qcom_smd_driver_register(struct qcom_smd_driver *drv); |