Commit 55488110 authored by Mathieu Poirier's avatar Mathieu Poirier Committed by Bjorn Andersson

rpmsg: Make rpmsg_{register|unregister}_device() public

Make function rpmsg_register_device() and rpmsg_unregister_device()
functions public so that they can be used by other clients.  While
doing so get rid of two obsolete function, i.e register_rpmsg_device()
and unregister_rpmsg_device(), to prevent confusion.
Tested-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: default avatarArnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20201120214245.172963-8-mathieu.poirier@linaro.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 1ee1e5e1
...@@ -74,10 +74,6 @@ struct rpmsg_endpoint_ops { ...@@ -74,10 +74,6 @@ struct rpmsg_endpoint_ops {
poll_table *wait); poll_table *wait);
}; };
int rpmsg_register_device(struct rpmsg_device *rpdev);
int rpmsg_unregister_device(struct device *parent,
struct rpmsg_channel_info *chinfo);
struct device *rpmsg_find_device(struct device *parent, struct device *rpmsg_find_device(struct device *parent,
struct rpmsg_channel_info *chinfo); struct rpmsg_channel_info *chinfo);
......
...@@ -164,8 +164,9 @@ static inline __rpmsg64 cpu_to_rpmsg64(struct rpmsg_device *rpdev, u64 val) ...@@ -164,8 +164,9 @@ static inline __rpmsg64 cpu_to_rpmsg64(struct rpmsg_device *rpdev, u64 val)
#if IS_ENABLED(CONFIG_RPMSG) #if IS_ENABLED(CONFIG_RPMSG)
int register_rpmsg_device(struct rpmsg_device *dev); int rpmsg_register_device(struct rpmsg_device *rpdev);
void unregister_rpmsg_device(struct rpmsg_device *dev); int rpmsg_unregister_device(struct device *parent,
struct rpmsg_channel_info *chinfo);
int __register_rpmsg_driver(struct rpmsg_driver *drv, struct module *owner); int __register_rpmsg_driver(struct rpmsg_driver *drv, struct module *owner);
void unregister_rpmsg_driver(struct rpmsg_driver *drv); void unregister_rpmsg_driver(struct rpmsg_driver *drv);
void rpmsg_destroy_ept(struct rpmsg_endpoint *); void rpmsg_destroy_ept(struct rpmsg_endpoint *);
...@@ -188,15 +189,18 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, ...@@ -188,15 +189,18 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
#else #else
static inline int register_rpmsg_device(struct rpmsg_device *dev) static inline int rpmsg_register_device(struct rpmsg_device *rpdev)
{ {
return -ENXIO; return -ENXIO;
} }
static inline void unregister_rpmsg_device(struct rpmsg_device *dev) static inline int rpmsg_unregister_device(struct device *parent,
struct rpmsg_channel_info *chinfo)
{ {
/* This shouldn't be possible */ /* This shouldn't be possible */
WARN_ON(1); WARN_ON(1);
return -ENXIO;
} }
static inline int __register_rpmsg_driver(struct rpmsg_driver *drv, static inline int __register_rpmsg_driver(struct rpmsg_driver *drv,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment