mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
3b904b046c
commit
39f0db298e
2 changed files with 20 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue