Skip to content

Commit 5548811

Browse files
mathieupoirierandersson
authored andcommitted
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: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201120214245.172963-8-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
1 parent 1ee1e5e commit 5548811

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/rpmsg/rpmsg_internal.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ struct rpmsg_endpoint_ops {
7474
poll_table *wait);
7575
};
7676

77-
int rpmsg_register_device(struct rpmsg_device *rpdev);
78-
int rpmsg_unregister_device(struct device *parent,
79-
struct rpmsg_channel_info *chinfo);
80-
8177
struct device *rpmsg_find_device(struct device *parent,
8278
struct rpmsg_channel_info *chinfo);
8379

include/linux/rpmsg.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ static inline __rpmsg64 cpu_to_rpmsg64(struct rpmsg_device *rpdev, u64 val)
164164

165165
#if IS_ENABLED(CONFIG_RPMSG)
166166

167-
int register_rpmsg_device(struct rpmsg_device *dev);
168-
void unregister_rpmsg_device(struct rpmsg_device *dev);
167+
int rpmsg_register_device(struct rpmsg_device *rpdev);
168+
int rpmsg_unregister_device(struct device *parent,
169+
struct rpmsg_channel_info *chinfo);
169170
int __register_rpmsg_driver(struct rpmsg_driver *drv, struct module *owner);
170171
void unregister_rpmsg_driver(struct rpmsg_driver *drv);
171172
void rpmsg_destroy_ept(struct rpmsg_endpoint *);
@@ -188,15 +189,18 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
188189

189190
#else
190191

191-
static inline int register_rpmsg_device(struct rpmsg_device *dev)
192+
static inline int rpmsg_register_device(struct rpmsg_device *rpdev)
192193
{
193194
return -ENXIO;
194195
}
195196

196-
static inline void unregister_rpmsg_device(struct rpmsg_device *dev)
197+
static inline int rpmsg_unregister_device(struct device *parent,
198+
struct rpmsg_channel_info *chinfo)
197199
{
198200
/* This shouldn't be possible */
199201
WARN_ON(1);
202+
203+
return -ENXIO;
200204
}
201205

202206
static inline int __register_rpmsg_driver(struct rpmsg_driver *drv,

0 commit comments

Comments
 (0)