diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-10-20 05:40:06 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-11-15 08:52:15 +0300 |
commit | aab8d8022304b646fbf6eed5f6ac9bc21d54d2fd (patch) | |
tree | d93bd609e457d4280e16ba1f9125465a2345d1f8 /drivers/remoteproc/remoteproc_core.c | |
parent | be33c28fadc5442d30f0f9dc08f6b4e3664b12f7 (diff) | |
download | linux-aab8d8022304b646fbf6eed5f6ac9bc21d54d2fd.tar.xz |
remoteproc: Assign kref to rproc_vdev
No functional change
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_core.c')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index b5e314fe1f4c..67f581d0c488 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -356,6 +356,8 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc, if (!rvdev) return -ENOMEM; + kref_init(&rvdev->refcount); + rvdev->rproc = rproc; /* parse the vrings */ @@ -384,6 +386,14 @@ free_rvdev: return ret; } +void rproc_vdev_release(struct kref *ref) +{ + struct rproc_vdev *rvdev = container_of(ref, struct rproc_vdev, refcount); + + list_del(&rvdev->node); + kfree(rvdev); +} + /** * rproc_handle_trace() - handle a shared trace buffer resource * @rproc: the remote processor |