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:

committed by
Andy Gross

parent
3b904b046c
commit
39f0db298e
@@ -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);
|
||||
|
Reference in New Issue
Block a user