 +#ifdef CONFIG_RPMSG_VIRTIO_CHAR
 +		struct virtio_rpmsg_rsvc *rsvc;
 +
-+		rsvc = virtio_rpmsg_create_rsvc(vrp, &chinfo);
++		mutex_lock(&vrp->endpoints_lock);
++		rsvc = virtio_rpmsg_create_rsvc(vrp, chinfo.name, chinfo.dst);
++		mutex_unlock(&vrp->endpoints_lock);
 +		if (!rsvc)
 +			dev_err(dev, "virtio_rpmsg_create_rsvc failed\n");
 +#else

 /*
  * create an rpmsg channel using its name and address info.
  * this function will be used to create both static and dynamic
@@ -444,6 +712,7 @@ static struct rpmsg_device *rpmsg_create_channel(struct virtproc_info *vrp,
 
 	return rpdev;
 }

 	}
 
 	return 0;
@@ -885,6 +1176,10 @@ static int rpmsg_probe(struct virtio_device *vdev)
 	int err = 0, i;
 	size_t total_buf_space;
 	bool notify;
