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

Commit afaf0dd0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "i2c-msm-geni: Initialize completion variable before txfer request"

parents ab416fc7 20e81ac7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -695,11 +695,11 @@ static int geni_i2c_lock_bus(struct geni_i2c_dev *gi2c)
		goto geni_i2c_err_lock_bus;
	}

	reinit_completion(&gi2c->xfer);
	/* Issue TX */
	tx_cookie = dmaengine_submit(gi2c->tx_desc);
	dma_async_issue_pending(gi2c->tx_c);

	reinit_completion(&gi2c->xfer);
	timeout = wait_for_completion_timeout(&gi2c->xfer, HZ);
	if (!timeout) {
		GENI_SE_ERR(gi2c->ipcl, true, gi2c->dev,
@@ -740,11 +740,11 @@ static void geni_i2c_unlock_bus(struct geni_i2c_dev *gi2c)
		goto geni_i2c_err_unlock_bus;
	}

	reinit_completion(&gi2c->xfer);
	/* Issue TX */
	tx_cookie = dmaengine_submit(gi2c->tx_desc);
	dma_async_issue_pending(gi2c->tx_c);

	reinit_completion(&gi2c->xfer);
	timeout = wait_for_completion_timeout(&gi2c->xfer, HZ);
	if (!timeout) {
		GENI_SE_ERR(gi2c->ipcl, true, gi2c->dev,