diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-03-29 00:35:22 -0400 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2016-04-19 22:55:12 -0400 |
commit | b853cb9628bfbcc4017da46d5f5b46e3eba9d8c6 (patch) | |
tree | 1a5af00411dc2a4d4f731bf18a00a6e859f62aa5 /include/linux/soc/qcom/smd.h | |
parent | afd356dfb3a4127b61a3519802a4db9046703724 (diff) |
soc: qcom: smd: Make callback pass channel reference
By passing the smd channel reference to the callback, rather than the
smd device, we can open additional smd channels from sub-devices of smd
devices.
Also updates the two smd clients today found in mainline.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'include/linux/soc/qcom/smd.h')
-rw-r--r-- | include/linux/soc/qcom/smd.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h index bd51c8a9d807..cb2f81559bc0 100644 --- a/include/linux/soc/qcom/smd.h +++ b/include/linux/soc/qcom/smd.h | |||
@@ -26,7 +26,7 @@ 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); | 29 | typedef int (*qcom_smd_cb_t)(struct qcom_smd_channel *, const void *, size_t); |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * struct qcom_smd_driver - smd driver struct | 32 | * struct qcom_smd_driver - smd driver struct |
@@ -50,13 +50,16 @@ struct qcom_smd_driver { | |||
50 | int qcom_smd_driver_register(struct qcom_smd_driver *drv); | 50 | int qcom_smd_driver_register(struct qcom_smd_driver *drv); |
51 | void qcom_smd_driver_unregister(struct qcom_smd_driver *drv); | 51 | void qcom_smd_driver_unregister(struct qcom_smd_driver *drv); |
52 | 52 | ||
53 | void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel); | ||
54 | void qcom_smd_set_drvdata(struct qcom_smd_channel *channel, void *data); | ||
55 | |||
53 | #define module_qcom_smd_driver(__smd_driver) \ | 56 | #define module_qcom_smd_driver(__smd_driver) \ |
54 | module_driver(__smd_driver, qcom_smd_driver_register, \ | 57 | module_driver(__smd_driver, qcom_smd_driver_register, \ |
55 | qcom_smd_driver_unregister) | 58 | qcom_smd_driver_unregister) |
56 | 59 | ||
57 | int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len); | 60 | int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len); |
58 | 61 | ||
59 | struct qcom_smd_channel *qcom_smd_open_channel(struct qcom_smd_device *sdev, | 62 | struct qcom_smd_channel *qcom_smd_open_channel(struct qcom_smd_channel *channel, |
60 | const char *name, | 63 | const char *name, |
61 | qcom_smd_cb_t cb); | 64 | qcom_smd_cb_t cb); |
62 | 65 | ||