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

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

Merge "msm: qpnp-power-on: change the usage of mutex while setting debounce delay"

parents 89a9a700 1e46eb32
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -297,12 +297,10 @@ static int qpnp_pon_set_dbc(struct qpnp_pon *pon, u32 delay)
	int rc = 0;
	u32 delay_reg;

	if (!pon->pon_input)
		return -EINVAL;

	mutex_lock(&pon->pon_input->mutex);
	if (delay == pon->dbc)
		goto unlock;
		goto out;
	if (pon->pon_input)
		mutex_lock(&pon->pon_input->mutex);

	if (delay < QPNP_PON_MIN_DBC_US)
		delay = QPNP_PON_MIN_DBC_US;
@@ -321,7 +319,9 @@ static int qpnp_pon_set_dbc(struct qpnp_pon *pon, u32 delay)
	pon->dbc = delay;

unlock:
	if (pon->pon_input)
		mutex_unlock(&pon->pon_input->mutex);
out:
	return rc;
}