]> Git Repo - linux.git/commitdiff
rpmsg: Make rpmsg_{register|unregister}_device() public
authorMathieu Poirier <[email protected]>
Fri, 20 Nov 2020 21:42:44 +0000 (14:42 -0700)
committerBjorn Andersson <[email protected]>
Tue, 24 Nov 2020 16:11:52 +0000 (10:11 -0600)
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 <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Reviewed-by: Arnaud Pouliquen <[email protected]>
Reviewed-by: Guennadi Liakhovetski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
drivers/rpmsg/rpmsg_internal.h
include/linux/rpmsg.h

index f1de73e0f2d626c1c4e451a1f262527e03f17f20..a76c344253bf58d2f3c9c5e99277ef55e3f1f4f3 100644 (file)
@@ -74,10 +74,6 @@ struct rpmsg_endpoint_ops {
                             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 rpmsg_channel_info *chinfo);
 
index faf2daff623835f7460f0390c5057861ce29b920..a5db828b2420a2de8334ea9719fc50f5a6382fe9 100644 (file)
@@ -164,8 +164,9 @@ static inline __rpmsg64 cpu_to_rpmsg64(struct rpmsg_device *rpdev, u64 val)
 
 #if IS_ENABLED(CONFIG_RPMSG)
 
-int register_rpmsg_device(struct rpmsg_device *dev);
-void unregister_rpmsg_device(struct rpmsg_device *dev);
+int rpmsg_register_device(struct rpmsg_device *rpdev);
+int rpmsg_unregister_device(struct device *parent,
+                           struct rpmsg_channel_info *chinfo);
 int __register_rpmsg_driver(struct rpmsg_driver *drv, struct module *owner);
 void unregister_rpmsg_driver(struct rpmsg_driver *drv);
 void rpmsg_destroy_ept(struct rpmsg_endpoint *);
@@ -188,15 +189,18 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
 
 #else
 
-static inline int register_rpmsg_device(struct rpmsg_device *dev)
+static inline int rpmsg_register_device(struct rpmsg_device *rpdev)
 {
        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 */
        WARN_ON(1);
+
+       return -ENXIO;
 }
 
 static inline int __register_rpmsg_driver(struct rpmsg_driver *drv,
This page took 0.057648 seconds and 4 git commands to generate.