gud: fix mobicore initialization
authorStricted <info@stricted.net>
Wed, 28 Aug 2019 15:26:26 +0000 (15:26 +0000)
committerStricted <info@stricted.net>
Sun, 3 May 2020 04:36:25 +0000 (04:36 +0000)
* backported from s9

Change-Id: I48476e899495490ded64a9e173e3daa3c4cdafa0

drivers/gud/gud-exynos9610/MobiCoreDriver/admin.c

index 2ead5ee60ad79070f4fde003eac1c07acdb58737..31b35a2995e9082472d6240f317570b220d8a5c0 100755 (executable)
@@ -951,7 +951,6 @@ static long admin_ioctl(struct file *file, unsigned int cmd,
                }
 
                /* Block until a request is available */
-               server_state_change(READY);
                ret = wait_for_completion_interruptible(
                                                &g_request.client_complete);
                if (ret)
@@ -1128,10 +1127,9 @@ static int admin_open(struct inode *inode, struct file *file)
                return l_ctx.last_tee_ret;
        }
 
-       reinit_completion_local(&g_request.client_complete);
-       reinit_completion_local(&g_request.server_complete);
        /* Requests from driver to daemon */
        mc_dev_info("daemon connection open, TGID %d", l_ctx.admin_tgid);
+       server_state_change(READY);
        return 0;
 }