diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-10-19 19:40:06 -0700 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-11-14 21:52:15 -0800 |
commit | aab8d8022304b646fbf6eed5f6ac9bc21d54d2fd (patch) | |
tree | d93bd609e457d4280e16ba1f9125465a2345d1f8 /drivers/remoteproc/remoteproc_core.c | |
parent | dt-binding: remoteproc: wcnss: Allow describing smd edge (diff) | |
download | linux-dev-aab8d8022304b646fbf6eed5f6ac9bc21d54d2fd.tar.xz linux-dev-aab8d8022304b646fbf6eed5f6ac9bc21d54d2fd.zip |
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 |