[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200922001000.899956-11-mathieu.poirier@linaro.org>
Date: Mon, 21 Sep 2020 18:10:00 -0600
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: ohad@...ery.com, bjorn.andersson@...aro.org,
guennadi.liakhovetski@...ux.intel.com
Cc: loic.pallardy@...com, linux-remoteproc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 10/10] rpmsg: ns: Make Name service module transport agnostic
Make name service module transport agnostic by using the rpmsg
device specific byte conversion routine.
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
---
drivers/rpmsg/rpmsg_ns.c | 10 ++++------
include/linux/rpmsg_ns.h | 4 ++--
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/rpmsg/rpmsg_ns.c b/drivers/rpmsg/rpmsg_ns.c
index b3318bf84433..1df3aaadfe10 100644
--- a/drivers/rpmsg/rpmsg_ns.c
+++ b/drivers/rpmsg/rpmsg_ns.c
@@ -18,9 +18,7 @@ static int rpmsg_ns_cb(struct rpmsg_device *rpdev, void *data, int len,
struct rpmsg_ns_msg *msg = data;
struct rpmsg_device *newch;
struct rpmsg_channel_info chinfo;
- struct virtio_rpmsg_channel *vch = to_virtio_rpmsg_channel(rpdev);
- struct virtproc_info *vrp = vch->vrp;
- struct device *dev = &vrp->vdev->dev;
+ struct device *dev = &rpdev->dev;
int ret;
#if defined(CONFIG_DYNAMIC_DEBUG)
@@ -38,13 +36,13 @@ static int rpmsg_ns_cb(struct rpmsg_device *rpdev, void *data, int len,
strncpy(chinfo.name, msg->name, sizeof(chinfo.name));
chinfo.src = RPMSG_ADDR_ANY;
- chinfo.dst = virtio32_to_cpu(vrp->vdev, msg->addr);
+ chinfo.dst = rpmsg32_to_cpu(rpdev, msg->addr);
dev_info(dev, "%sing channel %s addr 0x%x\n",
- virtio32_to_cpu(vrp->vdev, msg->flags) & RPMSG_NS_DESTROY ?
+ rpmsg32_to_cpu(rpdev, msg->flags) & RPMSG_NS_DESTROY ?
"destroy" : "creat", msg->name, chinfo.dst);
- if (virtio32_to_cpu(vrp->vdev, msg->flags) & RPMSG_NS_DESTROY) {
+ if (rpmsg32_to_cpu(rpdev, msg->flags) & RPMSG_NS_DESTROY) {
ret = rpmsg_release_channel(rpdev, &chinfo);
if (ret)
dev_err(dev, "rpmsg_destroy_channel failed: %d\n", ret);
diff --git a/include/linux/rpmsg_ns.h b/include/linux/rpmsg_ns.h
index aabc6c3c0d6d..9f3030b2145b 100644
--- a/include/linux/rpmsg_ns.h
+++ b/include/linux/rpmsg_ns.h
@@ -41,8 +41,8 @@ struct rpmsg_hdr {
*/
struct rpmsg_ns_msg {
char name[RPMSG_NAME_SIZE];
- __virtio32 addr;
- __virtio32 flags;
+ u32 addr;
+ u32 flags;
} __packed;
/**
--
2.25.1
Powered by blists - more mailing lists