msm: ADSPRPC: Unmap remote heap buffer only for ADSP SSR
Unmap remote heap buffer only for ADSP SSR
Change-Id: I9abff20cfdcc4588a3a377e73d38d3ea91316d25
Acked-by: Himateja Reddy <hmreddy@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index befe5b8..ef0dc88 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -2589,7 +2589,7 @@ static int fastrpc_channel_open(struct fastrpc_file *fl)
if (err)
pr_warn("adsprpc: initial intent fail for %d err %d\n",
cid, err);
- if (me->channel[cid].ssrcount !=
+ if (cid == 0 && me->channel[cid].ssrcount !=
me->channel[cid].prevssrcount) {
if (fastrpc_mmap_remove_ssr(fl))
pr_err("ADSPRPC: SSR: Failed to unmap remote heap\n");