diff options
author | Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> | 2021-10-01 12:12:30 +0200 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2021-10-15 16:49:55 +0200 |
commit | 9955548919c47a6987b40d90a30fd56bbc043e7b (patch) | |
tree | d80104dac8911591e58af842f6a705f1f24d3e40 /drivers/remoteproc | |
parent | remoteproc: omap_remoteproc: simplify getting .driver_data (diff) | |
download | linux-9955548919c47a6987b40d90a30fd56bbc043e7b.tar.xz linux-9955548919c47a6987b40d90a30fd56bbc043e7b.zip |
remoteproc: Remove vdev_to_rvdev and vdev_to_rproc from remoteproc API
These both functions are only used by the remoteproc_virtio.
There is no reason to expose them in the API.
Move the functions in remoteproc_virtio.c
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211001101234.4247-4-arnaud.pouliquen@foss.st.com
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_virtio.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index cf4d54e98e6a..70ab496d0431 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c @@ -23,6 +23,18 @@ #include "remoteproc_internal.h" +static struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) +{ + return container_of(vdev->dev.parent, struct rproc_vdev, dev); +} + +static struct rproc *vdev_to_rproc(struct virtio_device *vdev) +{ + struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); + + return rvdev->rproc; +} + /* kick the remote processor, and let it know which virtqueue to poke at */ static bool rproc_virtio_notify(struct virtqueue *vq) { |