Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463299

[PATCH 11/14] rpmsg: Move virtio specifics from public header

From Bjorn Andersson <bjorn.andersson@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 11/14] rpmsg: Move virtio specifics from public header
Date 2016-08-16 02:20 +0200
Message-ID <s6AgO-4eu-37@gated-at.bofh.it> (permalink)
References <s6AgN-4eu-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Move virtio rpmsg implementation details from the public header file to
the virtio rpmsg implementation.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/rpmsg/virtio_rpmsg_bus.c | 52 ++++++++++++++++++++++++++++++++++++++++
 include/linux/rpmsg.h            | 52 ----------------------------------------
 2 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index 6ad4c657aaf4..a284b48285a1 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -75,6 +75,58 @@ struct virtproc_info {
 	struct rpmsg_endpoint *ns_ept;
 };
 
+/* The feature bitmap for virtio rpmsg */
+#define VIRTIO_RPMSG_F_NS	0 /* RP supports name service notifications */
+
+/**
+ * struct rpmsg_hdr - common header for all rpmsg messages
+ * @src: source address
+ * @dst: destination address
+ * @reserved: reserved for future use
+ * @len: length of payload (in bytes)
+ * @flags: message flags
+ * @data: @len bytes of message payload data
+ *
+ * Every message sent(/received) on the rpmsg bus begins with this header.
+ */
+struct rpmsg_hdr {
+	u32 src;
+	u32 dst;
+	u32 reserved;
+	u16 len;
+	u16 flags;
+	u8 data[0];
+} __packed;
+
+/**
+ * struct rpmsg_ns_msg - dynamic name service announcement message
+ * @name: name of remote service that is published
+ * @addr: address of remote service that is published
+ * @flags: indicates whether service is created or destroyed
+ *
+ * This message is sent across to publish a new service, or announce
+ * about its removal. When we receive these messages, an appropriate
+ * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe()
+ * or ->remove() handler of the appropriate rpmsg driver will be invoked
+ * (if/as-soon-as one is registered).
+ */
+struct rpmsg_ns_msg {
+	char name[RPMSG_NAME_SIZE];
+	u32 addr;
+	u32 flags;
+} __packed;
+
+/**
+ * enum rpmsg_ns_flags - dynamic name service announcement flags
+ *
+ * @RPMSG_NS_CREATE: a new remote service was just created
+ * @RPMSG_NS_DESTROY: a known remote service was just destroyed
+ */
+enum rpmsg_ns_flags {
+	RPMSG_NS_CREATE		= 0,
+	RPMSG_NS_DESTROY	= 1,
+};
+
 /**
  * @vrp: the remote processor this channel belongs to
  */
diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h
index a5679b9b6102..db409a8e3178 100644
--- a/include/linux/rpmsg.h
+++ b/include/linux/rpmsg.h
@@ -41,58 +41,6 @@
 #include <linux/kref.h>
 #include <linux/mutex.h>
 
-/* The feature bitmap for virtio rpmsg */
-#define VIRTIO_RPMSG_F_NS	0 /* RP supports name service notifications */
-
-/**
- * struct rpmsg_hdr - common header for all rpmsg messages
- * @src: source address
- * @dst: destination address
- * @reserved: reserved for future use
- * @len: length of payload (in bytes)
- * @flags: message flags
- * @data: @len bytes of message payload data
- *
- * Every message sent(/received) on the rpmsg bus begins with this header.
- */
-struct rpmsg_hdr {
-	u32 src;
-	u32 dst;
-	u32 reserved;
-	u16 len;
-	u16 flags;
-	u8 data[0];
-} __packed;
-
-/**
- * struct rpmsg_ns_msg - dynamic name service announcement message
- * @name: name of remote service that is published
- * @addr: address of remote service that is published
- * @flags: indicates whether service is created or destroyed
- *
- * This message is sent across to publish a new service, or announce
- * about its removal. When we receive these messages, an appropriate
- * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe()
- * or ->remove() handler of the appropriate rpmsg driver will be invoked
- * (if/as-soon-as one is registered).
- */
-struct rpmsg_ns_msg {
-	char name[RPMSG_NAME_SIZE];
-	u32 addr;
-	u32 flags;
-} __packed;
-
-/**
- * enum rpmsg_ns_flags - dynamic name service announcement flags
- *
- * @RPMSG_NS_CREATE: a new remote service was just created
- * @RPMSG_NS_DESTROY: a known remote service was just destroyed
- */
-enum rpmsg_ns_flags {
-	RPMSG_NS_CREATE		= 0,
-	RPMSG_NS_DESTROY	= 1,
-};
-
 #define RPMSG_ADDR_ANY		0xFFFFFFFF
 
 struct rpmsg_device;
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/14] Split rpmsg into a framework Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:20 +0200
  [PATCH 12/14] rpmsg: Make rpmsg_create_ept() take channel_info struct Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:20 +0200
  [PATCH 04/14] rpmsg: Internalize rpmsg_send() implementations Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:20 +0200
  [PATCH 13/14] rpmsg: Allow callback to return errors Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:20 +0200
  [PATCH 09/14] rpmsg: Internalize rpmsg core ops Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:20 +0200
  [PATCH 02/14] rpmsg: Name rpmsg devices based on channel id Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:20 +0200
  [PATCH 11/14] rpmsg: Move virtio specifics from public header Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:20 +0200
  [PATCH 05/14] rpmsg: Unify rpmsg device vs channel naming Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:20 +0200
  [PATCH 03/14] rpmsg: rpmsg_send() operations takes rpmsg_endpoint Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:30 +0200
    RE: [PATCH 03/14] rpmsg: rpmsg_send() operations takes  rpmsg_endpoint Loic PALLARDY <loic.pallardy@st.com> - 2016-08-18 09:40 +0200
      Re: [PATCH 03/14] rpmsg: rpmsg_send() operations takes rpmsg_endpoint Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-19 03:00 +0200
  [PATCH 01/14] rpmsg: Enable matching devices with drivers based on DT Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-16 02:30 +0200
  Re: [PATCH 08/14] rpmsg: Split rpmsg core and virtio backend Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-08-19 03:30 +0200

csiph-web