[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200515205642.13529-4-mathieu.poirier@linaro.org>
Date: Fri, 15 May 2020 14:56:42 -0600
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: ohad@...ery.com, bjorn.andersson@...aro.org
Cc: arnaud.pouliquen@...com, s-anna@...com,
linux-remoteproc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v6 3/3] sample: rpmsg: Print out RPMSG device name extension
Use the new rpmsg_device_get_name_extension() API to print the
RPMSG name extension if used by a RPMSG device name.
Suggested-by: Arnaud Pouliquen <arnaud.pouliquen@...com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
---
samples/rpmsg/rpmsg_client_sample.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c
index ae5081662283..2c5dc65ed844 100644
--- a/samples/rpmsg/rpmsg_client_sample.c
+++ b/samples/rpmsg/rpmsg_client_sample.c
@@ -51,8 +51,13 @@ static int rpmsg_sample_cb(struct rpmsg_device *rpdev, void *data, int len,
static int rpmsg_sample_probe(struct rpmsg_device *rpdev)
{
int ret;
+ const char *extension;
struct instance_data *idata;
+ extension = rpmsg_device_get_name_extension(rpdev, 1);
+ if (!IS_ERR_OR_NULL(extension))
+ dev_info(&rpdev->dev, "extension: %s\n", extension);
+
dev_info(&rpdev->dev, "new channel: 0x%x -> 0x%x!\n",
rpdev->src, rpdev->dst);
--
2.20.1
Powered by blists - more mailing lists