]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/commitdiff
Delete hil proc in remoteproc only
authorWendy Liang <jliang@xilinx.com>
Thu, 26 Jan 2017 06:49:04 +0000 (22:49 -0800)
committerWendy Liang <jliang@xilinx.com>
Mon, 6 Feb 2017 19:31:33 +0000 (11:31 -0800)
do not delete hil proc in rpmsg, instead delete it in remoteproc.
As rpmsg can be decoupled from remoteproc.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/remoteproc/remoteproc.c
lib/rpmsg/remote_device.c

index 406532214b1f20766fe469e368a8fc352f4c2eb2..ced4eef662e170e032c79123c992a8b0de4ad131 100644 (file)
@@ -131,6 +131,10 @@ int remoteproc_resource_deinit(struct remote_proc *rproc)
                if (rproc->rdev) {
                        rpmsg_deinit(rproc->rdev);
                }
+               if (rproc->proc) {
+                       hil_delete_proc(rproc->proc);
+                       rproc->proc = NULL;
+               }
                metal_free_memory(rproc);
        }
 
index 930c9e61a20c8a64f905b1a62ef61457dc115f57..80ad83cf4b3ff59255e66081d0b0d8e660623839 100644 (file)
@@ -224,10 +224,6 @@ void rpmsg_rdev_deinit(struct remote_device *rdev)
        metal_mutex_release(&rdev->lock);
        hil_free_vqs(&rdev->virt_dev);
 
-       if (rdev->proc) {
-               hil_delete_proc(rdev->proc);
-               rdev->proc = 0;
-       }
        metal_mutex_deinit(&rdev->lock);
 
        metal_free_memory(rdev);