linux-kernel.vger.kernel.org archive mirror
 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 1/9] rpmsg: Move rpmsg_endpoint_ops to rpmsg.h
Date: Tue, 13 Oct 2020 17:25:11 -0600	[thread overview]
Message-ID: <20201013232519.1367542-2-mathieu.poirier@linaro.org> (raw)
In-Reply-To: <20201013232519.1367542-1-mathieu.poirier@linaro.org>

Move structure rpmsg_endpoint_ops to header rpmsg.h so that it can
be used by other entities.

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

diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h
index 3fc83cd50e98..094cf968d2d3 100644
--- a/drivers/rpmsg/rpmsg_internal.h
+++ b/drivers/rpmsg/rpmsg_internal.h
@@ -18,25 +18,6 @@
 #define to_rpmsg_device(d) container_of(d, struct rpmsg_device, dev)
 #define to_rpmsg_driver(d) container_of(d, struct rpmsg_driver, drv)
 
-/**
- * struct rpmsg_device_ops - indirection table for the rpmsg_device operations
- * @create_ept:		create backend-specific endpoint, required
- * @announce_create:	announce presence of new channel, optional
- * @announce_destroy:	announce destruction of channel, optional
- *
- * Indirection table for the operations that a rpmsg backend should implement.
- * @announce_create and @announce_destroy are optional as the backend might
- * advertise new channels implicitly by creating the endpoints.
- */
-struct rpmsg_device_ops {
-	struct rpmsg_endpoint *(*create_ept)(struct rpmsg_device *rpdev,
-					    rpmsg_rx_cb_t cb, void *priv,
-					    struct rpmsg_channel_info chinfo);
-
-	int (*announce_create)(struct rpmsg_device *ept);
-	int (*announce_destroy)(struct rpmsg_device *ept);
-};
-
 /**
  * struct rpmsg_endpoint_ops - indirection table for rpmsg_endpoint operations
  * @destroy_ept:	see @rpmsg_destroy_ept(), required
diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h
index 9fe156d1c018..9fe1c54ae995 100644
--- a/include/linux/rpmsg.h
+++ b/include/linux/rpmsg.h
@@ -22,7 +22,6 @@
 
 struct rpmsg_device;
 struct rpmsg_endpoint;
-struct rpmsg_device_ops;
 struct rpmsg_endpoint_ops;
 
 /**
@@ -37,6 +36,27 @@ struct rpmsg_channel_info {
 	u32 dst;
 };
 
+typedef int (*rpmsg_rx_cb_t)(struct rpmsg_device *, void *, int, void *, u32);
+
+/**
+ * struct rpmsg_device_ops - indirection table for the rpmsg_device operations
+ * @create_ept:		create backend-specific endpoint, required
+ * @announce_create:	announce presence of new channel, optional
+ * @announce_destroy:	announce destruction of channel, optional
+ *
+ * Indirection table for the operations that a rpmsg backend should implement.
+ * @announce_create and @announce_destroy are optional as the backend might
+ * advertise new channels implicitly by creating the endpoints.
+ */
+struct rpmsg_device_ops {
+	struct rpmsg_endpoint *(*create_ept)(struct rpmsg_device *rpdev,
+					    rpmsg_rx_cb_t cb, void *priv,
+					    struct rpmsg_channel_info chinfo);
+
+	int (*announce_create)(struct rpmsg_device *ept);
+	int (*announce_destroy)(struct rpmsg_device *ept);
+};
+
 /**
  * rpmsg_device - device that belong to the rpmsg bus
  * @dev: the device struct
@@ -59,8 +79,6 @@ struct rpmsg_device {
 	const struct rpmsg_device_ops *ops;
 };
 
-typedef int (*rpmsg_rx_cb_t)(struct rpmsg_device *, void *, int, void *, u32);
-
 /**
  * struct rpmsg_endpoint - binds a local rpmsg address to its user
  * @rpdev: rpmsg channel device
-- 
2.25.1


  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 ` Mathieu Poirier [this message]
2020-10-15  8:48   ` [PATCH v2 1/9] rpmsg: Move rpmsg_endpoint_ops to rpmsg.h 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 ` [PATCH v2 8/9] rpmsg: Make rpmsg_{register|unregister}_device() public Mathieu Poirier
2020-10-15  8:47   ` 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-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).