gud: fix mobicore initialization
authorStricted <info@stricted.net>
Wed, 28 Aug 2019 15:26:26 +0000 (15:26 +0000)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:14 +0000 (21:13 +0000)
* backported from s9

Change-Id: I48476e899495490ded64a9e173e3daa3c4cdafa0

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

index 092e2aeba3815439a2de947a3441a6939349f53e..68b23ea806f43b7b9e640860b3259d9060644959 100644 (file)
@@ -903,7 +903,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)
@@ -1070,10 +1069,9 @@ static int admin_open(struct inode *inode, struct file *file)
                return admin_ctx.last_start_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", admin_ctx.admin_tgid);
+       server_state_change(READY);
        return 0;
 }