Skip to content

Commit 9955548

Browse files
arnopoandersson
authored andcommitted
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 <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c34bfaf commit 9955548

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

drivers/remoteproc/remoteproc_virtio.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@
2323

2424
#include "remoteproc_internal.h"
2525

26+
static struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev)
27+
{
28+
return container_of(vdev->dev.parent, struct rproc_vdev, dev);
29+
}
30+
31+
static struct rproc *vdev_to_rproc(struct virtio_device *vdev)
32+
{
33+
struct rproc_vdev *rvdev = vdev_to_rvdev(vdev);
34+
35+
return rvdev->rproc;
36+
}
37+
2638
/* kick the remote processor, and let it know which virtqueue to poke at */
2739
static bool rproc_virtio_notify(struct virtqueue *vq)
2840
{

include/linux/remoteproc.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -684,18 +684,6 @@ int rproc_coredump_add_custom_segment(struct rproc *rproc,
684684
void *priv);
685685
int rproc_coredump_set_elf_info(struct rproc *rproc, u8 class, u16 machine);
686686

687-
static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev)
688-
{
689-
return container_of(vdev->dev.parent, struct rproc_vdev, dev);
690-
}
691-
692-
static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev)
693-
{
694-
struct rproc_vdev *rvdev = vdev_to_rvdev(vdev);
695-
696-
return rvdev->rproc;
697-
}
698-
699687
void rproc_add_subdev(struct rproc *rproc, struct rproc_subdev *subdev);
700688

701689
void rproc_remove_subdev(struct rproc *rproc, struct rproc_subdev *subdev);

0 commit comments

Comments
 (0)