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

Commit b279c83d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mhi_dev: Add event lock"

parents b285f709 b486f958
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -456,6 +456,7 @@ static int mhi_dev_send_event(struct mhi_dev *mhi, int evnt_ring,
		}
	}

	mutex_lock(&mhi->mhi_event_lock);
	/* add the ring element */
	mhi_dev_add_element(ring, el);

@@ -470,6 +471,7 @@ static int mhi_dev_send_event(struct mhi_dev *mhi, int evnt_ring,
	 */
	wmb();

	mutex_unlock(&mhi->mhi_event_lock);
	mhi_log(MHI_MSG_VERBOSE, "event sent:\n");
	mhi_log(MHI_MSG_VERBOSE, "evnt ptr : 0x%llx\n", el->evt_tr_comp.ptr);
	mhi_log(MHI_MSG_VERBOSE, "evnt len : 0x%x\n", el->evt_tr_comp.len);
@@ -1836,6 +1838,7 @@ static int mhi_dev_probe(struct platform_device *pdev)
	INIT_LIST_HEAD(&mhi_ctx->event_ring_list);
	INIT_LIST_HEAD(&mhi_ctx->process_ring_list);
	mutex_init(&mhi_ctx->mhi_lock);
	mutex_init(&mhi_ctx->mhi_event_lock);
	mutex_init(&mhi_ctx->mhi_write_test);

	rc = mhi_init(mhi_ctx);
+1 −0
Original line number Diff line number Diff line
@@ -480,6 +480,7 @@ struct mhi_dev {
	/* Scheduler work */
	struct work_struct		chdb_ctrl_work;
	struct mutex			mhi_lock;
	struct mutex			mhi_event_lock;

	/* process a ring element */
	struct workqueue_struct		*pending_ring_wq;