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

Commit 1c3083cc authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: sync: Allow drivers to register cb for the same fence id"...

Merge "msm: camera: sync: Allow drivers to register cb for the same fence id" into dev/msm-4.14-camx
parents 1c22a2f3 2bbbf232
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ int cam_sync_register_callback(sync_callback cb_func,
	void *userdata, int32_t sync_obj)
{
	struct sync_callback_info *sync_cb;
	struct sync_callback_info *cb_info;
	struct sync_table_row *row = NULL;
	int status = 0;

@@ -83,17 +82,6 @@ int cam_sync_register_callback(sync_callback cb_func,
		return -EINVAL;
	}

	/* Don't register if callback was registered earlier */
	list_for_each_entry(cb_info, &row->callback_list, list) {
		if (cb_info->callback_func == cb_func &&
			cb_info->cb_data == userdata) {
			CAM_ERR(CAM_SYNC, "Duplicate register for sync_obj %d",
				sync_obj);
			spin_unlock_bh(&sync_dev->row_spinlocks[sync_obj]);
			return -EALREADY;
		}
	}

	sync_cb = kzalloc(sizeof(*sync_cb), GFP_ATOMIC);
	if (!sync_cb) {
		spin_unlock_bh(&sync_dev->row_spinlocks[sync_obj]);