diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2012-07-20 16:42:59 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2012-07-20 16:42:59 +0900 |
| commit | 9ff561fdf73493d757bbc74aa58627e1381650fb (patch) | |
| tree | 4484d230662126b1ac94ea545ca5429c91e0a68b /include/linux/rpmsg.h | |
| parent | 7b98cf0cf4e8798b9e7435f966ed0d90a2a925de (diff) | |
| parent | fdd85ec3eb8cc1b663678a3efa16ee59a32e0277 (diff) | |
Merge branch 'common/pinctrl' into sh-latest
Diffstat (limited to 'include/linux/rpmsg.h')
| -rw-r--r-- | include/linux/rpmsg.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index a8e50e44203c..82a673905edb 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -38,6 +38,8 @@ #include <linux/types.h> #include <linux/device.h> #include <linux/mod_devicetable.h> +#include <linux/kref.h> +#include <linux/mutex.h> /* The feature bitmap for virtio rpmsg */ #define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ @@ -120,7 +122,9 @@ typedef void (*rpmsg_rx_cb_t)(struct rpmsg_channel *, void *, int, void *, u32); /** * struct rpmsg_endpoint - binds a local rpmsg address to its user * @rpdev: rpmsg channel device + * @refcount: when this drops to zero, the ept is deallocated * @cb: rx callback handler + * @cb_lock: must be taken before accessing/changing @cb * @addr: local rpmsg address * @priv: private data for the driver's use * @@ -140,7 +144,9 @@ typedef void (*rpmsg_rx_cb_t)(struct rpmsg_channel *, void *, int, void *, u32); */ struct rpmsg_endpoint { struct rpmsg_channel *rpdev; + struct kref refcount; rpmsg_rx_cb_t cb; + struct mutex cb_lock; u32 addr; void *priv; }; |
