Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9dbfd34a authored by Suresh Vankadara's avatar Suresh Vankadara
Browse files

msm: camera: sync: Fix merge sync object issue



Update the state of parent sync only when all child
sync objects are signalled.

Change-Id: I098fd1b260f3e7d35f26d495c7f1ebfed10b8043
Signed-off-by: default avatarSuresh Vankadara <svankada@codeaurora.org>
parent d68ce08f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -90,8 +90,9 @@ int cam_sync_register_callback(sync_callback cb_func,
	}

	/* Trigger callback if sync object is already in SIGNALED state */
	if (row->state == CAM_SYNC_STATE_SIGNALED_SUCCESS ||
		row->state == CAM_SYNC_STATE_SIGNALED_ERROR) {
	if ((row->state == CAM_SYNC_STATE_SIGNALED_SUCCESS ||
		row->state == CAM_SYNC_STATE_SIGNALED_ERROR) &&
		(!row->remaining)) {
		sync_cb->callback_func = cb_func;
		sync_cb->cb_data = userdata;
		sync_cb->sync_obj = sync_obj;