All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: ohad@wizery.com, bjorn.andersson@linaro.org
Cc: guennadi.liakhovetski@linux.intel.com, arnaud.pouliquen@st.com,
	linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 8/9] rpmsg: Make rpmsg_{register|unregister}_device() public
Date: Tue, 13 Oct 2020 17:25:18 -0600	[thread overview]
Message-ID: <20201013232519.1367542-9-mathieu.poirier@linaro.org> (raw)
In-Reply-To: <20201013232519.1367542-1-mathieu.poirier@linaro.org>

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.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
 drivers/rpmsg/rpmsg_internal.h |  4 ----
 include/linux/rpmsg.h          | 12 ++++++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h
index b9b34b416b7b..70de053581bd 100644
--- a/drivers/rpmsg/rpmsg_internal.h
+++ b/drivers/rpmsg/rpmsg_internal.h
@@ -49,10 +49,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);
 
diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h
index eb70463a9f2e..0b3ec18ddbaa 100644
--- a/include/linux/rpmsg.h
+++ b/include/linux/rpmsg.h
@@ -188,8 +188,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 *);
@@ -212,15 +213,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,
-- 
2.25.1


  parent reply	other threads:[~2020-10-14  9:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 23:25 [PATCH v2 0/9] rpmsg: Make RPMSG name service modular Mathieu Poirier
2020-10-13 23:25 ` [PATCH v2 1/9] rpmsg: Move rpmsg_endpoint_ops to rpmsg.h Mathieu Poirier
2020-10-15  8:48   ` Arnaud POULIQUEN
2020-10-13 23:25 ` [PATCH v2 2/9] rpmsg: Introduce __rpmsg{16|32|64} types Mathieu Poirier
2020-10-14 16:31   ` Arnaud POULIQUEN
2020-10-15 19:32     ` Mathieu Poirier
2020-10-16  9:41       ` Arnaud POULIQUEN
2020-10-13 23:25 ` [PATCH v2 3/9] rpmsg: virtio: Move from virtio to rpmsg byte conversion Mathieu Poirier
2020-10-14 17:04   ` Arnaud POULIQUEN
2020-10-15 19:46     ` Mathieu Poirier
2020-10-13 23:25 ` [PATCH v2 4/9] rpmsg: Move rpmsg_hr and rpmsg_ns_msg to header file Mathieu Poirier
2020-10-15  8:33   ` Arnaud POULIQUEN
2020-10-15 20:19     ` Mathieu Poirier
2020-10-16  9:45       ` Arnaud POULIQUEN
2020-10-13 23:25 ` [PATCH v2 5/9] rpmsg: virtio: Rename rpmsg_create_channel Mathieu Poirier
2020-10-13 23:25 ` [PATCH v2 6/9] rpmsg: core: Add channel creation internal API Mathieu Poirier
2020-10-13 23:25 ` [PATCH v2 7/9] rpmsg: virtio: Add rpmsg channel device ops Mathieu Poirier
2020-10-13 23:25 ` Mathieu Poirier [this message]
2020-10-15  8:47   ` [PATCH v2 8/9] rpmsg: Make rpmsg_{register|unregister}_device() public Arnaud POULIQUEN
2020-10-13 23:25 ` [PATCH v2 9/9] rpmsg: Turn name service into a stand alone driver Mathieu Poirier
2020-10-14 10:18 ` [PATCH v2 0/9] rpmsg: Make RPMSG name service modular Guennadi Liakhovetski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201013232519.1367542-9-mathieu.poirier@linaro.org \
    --to=mathieu.poirier@linaro.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.