When the endpoint device is created by the application a destination
address as been specified in the rpmsg_channel_info structure.
Send the message to this address instead of the default one.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliq...@foss.st.com>
---
 drivers/rpmsg/rpmsg_char.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
index 83c10b39b139..09ae1304837c 100644
--- a/drivers/rpmsg/rpmsg_char.c
+++ b/drivers/rpmsg/rpmsg_char.c
@@ -225,9 +225,9 @@ static ssize_t rpmsg_eptdev_write_iter(struct kiocb *iocb,
        }
 
        if (filp->f_flags & O_NONBLOCK)
-               ret = rpmsg_trysend(eptdev->ept, kbuf, len);
+               ret = rpmsg_trysendto(eptdev->ept, kbuf, len, 
eptdev->chinfo.dst);
        else
-               ret = rpmsg_send(eptdev->ept, kbuf, len);
+               ret = rpmsg_sendto(eptdev->ept, kbuf, len, eptdev->chinfo.dst);
 
 unlock_eptdev:
        mutex_unlock(&eptdev->ept_lock);
-- 
2.17.1

Reply via email to