aboutsummaryrefslogtreecommitdiffstats
path: root/samples/rpmsg
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2016-09-01 18:27:55 -0400
committerBjorn Andersson <bjorn.andersson@linaro.org>2016-09-09 01:15:19 -0400
commit2a48d7322dc88f1bc6c8bd9e087fc6341ba659fd (patch)
tree5e7f22bdf638a51576523e631589d52cdadf3012 /samples/rpmsg
parent4dffed5b3ac796bcaf040ca1f64e650f9263363e (diff)
rpmsg: rpmsg_send() operations takes rpmsg_endpoint
The rpmsg_send() operations has been taking a rpmsg_device, but this forces users of secondary rpmsg_endpoints to use the rpmsg_sendto() interface - by extracting source and destination from the given data structures. If we instead pass the rpmsg_endpoint to these functions a service can use rpmsg_sendto() to respond to messages, even on secondary endpoints. In addition this would allow us to support operations on multiple channels in future backends that does not support off-channel operations. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'samples/rpmsg')
-rw-r--r--samples/rpmsg/rpmsg_client_sample.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/rpmsg/rpmsg_client_sample.c b/samples/rpmsg/rpmsg_client_sample.c
index 7e17d1c0aaf2..37975eddd64e 100644
--- a/samples/rpmsg/rpmsg_client_sample.c
+++ b/samples/rpmsg/rpmsg_client_sample.c
@@ -47,7 +47,7 @@ static void rpmsg_sample_cb(struct rpmsg_channel *rpdev, void *data, int len,
47 } 47 }
48 48
49 /* send a new message now */ 49 /* send a new message now */
50 ret = rpmsg_send(rpdev, MSG, strlen(MSG)); 50 ret = rpmsg_send(rpdev->ept, MSG, strlen(MSG));
51 if (ret) 51 if (ret)
52 dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret); 52 dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret);
53} 53}
@@ -67,7 +67,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev)
67 dev_set_drvdata(&rpdev->dev, idata); 67 dev_set_drvdata(&rpdev->dev, idata);
68 68
69 /* send a message to our remote processor */ 69 /* send a message to our remote processor */
70 ret = rpmsg_send(rpdev, MSG, strlen(MSG)); 70 ret = rpmsg_send(rpdev->ept, MSG, strlen(MSG));
71 if (ret) { 71 if (ret) {
72 dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret); 72 dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret);
73 return ret; 73 return ret;