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

Commit 9df75e31 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram
Browse files

msm: camera: sync: Add warning logs



This change checks the state of the sync object, it's parents
and children before detroying the sync obj. If it finds any of
above mentioned objects to be in active state it will print a
warning message.

Change-Id: I4966c6c80f751e8cb41f7f10e4493f9599677d62
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent f068b374
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -175,6 +175,12 @@ int cam_sync_deinit_object(struct sync_table_row *table, uint32_t idx)
			idx);
		return -EINVAL;
	}

	if (row->state == CAM_SYNC_STATE_ACTIVE)
		CAM_WARN(CAM_SYNC,
			"Destroying an active sync object name:%s id:%i",
			row->name, row->sync_id);

	row->state = CAM_SYNC_STATE_INVALID;

	/* Object's child and parent objects will be added into this list */
@@ -217,6 +223,11 @@ int cam_sync_deinit_object(struct sync_table_row *table, uint32_t idx)
			continue;
		}

		if (child_row->state == CAM_SYNC_STATE_ACTIVE)
			CAM_WARN(CAM_SYNC,
				"Warning: destroying active child sync obj = %d",
				child_info->sync_id);

		cam_sync_util_cleanup_parents_list(child_row,
			SYNC_LIST_CLEAN_ONE, idx);

@@ -241,6 +252,11 @@ int cam_sync_deinit_object(struct sync_table_row *table, uint32_t idx)
			continue;
		}

		if (parent_row->state == CAM_SYNC_STATE_ACTIVE)
			CAM_WARN(CAM_SYNC,
				"Warning: destroying active parent sync obj = %d",
				parent_info->sync_id);

		cam_sync_util_cleanup_children_list(parent_row,
			SYNC_LIST_CLEAN_ONE, idx);