linux-brain/drivers/rpmsg
Loic Pallardy fcdab6ca9c rpmsg: virtio_rpmsg_bus: fix channel creation
commit 63447646ac upstream.

Since commit 4dffed5b3a ("rpmsg: Name rpmsg devices based on
channel id"), it is no more possible for a firmware to register twice
a service (on different endpoints). rpmsg_register_device function
is failing when calling device_add for the second time as second
device has the same name as first one already register.
It is because name is based only on service name and so is not more
unique. Previously name was unique thanks to the use of rpmsg_dev_index.

This patch adds destination and source endpoint numbers device name to
create an unique identifier.

Fixes: 4dffed5b3a ("rpmsg: Name rpmsg devices based on channel id")
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
[bjorn: flipped name and address in device name]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-26 08:24:44 +01:00
..
Kconfig rpmsg: smd: fix dependency on QCOM_SMD=n 2016-09-12 07:05:13 -07:00
Makefile rpmsg: Introduce Qualcomm SMD backend 2016-09-08 22:15:26 -07:00
qcom_smd.c rpmsg: qcom_smd: Correct return value for O_NONBLOCK 2017-01-12 11:39:31 +01:00
rpmsg_core.c rpmsg: virtio_rpmsg_bus: fix channel creation 2017-01-26 08:24:44 +01:00
rpmsg_internal.h rpmsg: Hide rpmsg indirection tables 2016-09-08 22:15:24 -07:00
virtio_rpmsg_bus.c rpmsg: Allow callback to return errors 2016-09-08 22:15:25 -07:00