Skip to content

Commit

Permalink
rpmsg: virtio_rpmsg_bus: move back rpmsg_hdr into a public header
Browse files Browse the repository at this point in the history
Commit e88dae5 ("rpmsg: Move virtio specifics from public header")
has moved the struct rpmsg_hdr definition from the public rpmsg.h and
made it private to virtio_rpmsg_bus module. This structure is a common
header used in all virtio rpmsg messages, and used by various virtio
rpmsg bus drivers. So, move this back into the virtio_rpmsg specific
public header to make it visible to various rpmsg drivers.

Signed-off-by: Suman Anna <s-anna@ti.com>
  • Loading branch information
sumananna committed Jan 15, 2018
1 parent cc378af commit b894d49
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
21 changes: 1 addition & 20 deletions drivers/rpmsg/virtio_rpmsg_bus.c
Expand Up @@ -34,6 +34,7 @@
#include <linux/rpmsg.h>
#include <linux/mutex.h>
#include <linux/of_device.h>
#include <linux/rpmsg/virtio_rpmsg.h>

#include "rpmsg_internal.h"

Expand Down Expand Up @@ -80,26 +81,6 @@ struct virtproc_info {
/* 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
Expand Down
24 changes: 24 additions & 0 deletions include/linux/rpmsg/virtio_rpmsg.h
@@ -0,0 +1,24 @@
#ifndef _LINUX_RPMSG_VIRTIO_RPMSG_H
#define _LINUX_RPMSG_VIRTIO_RPMSG_H

/**
* struct rpmsg_hdr - common header for all virtio 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;

#endif

0 comments on commit b894d49

Please sign in to comment.