lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v7 3/3] sample: rpmsg: Print out RPMSG device name extension
Date
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@st.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.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.25.1
\
 
 \ /
  Last update: 2020-06-15 23:40    [W:0.066 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site