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

Commit 32e00ce6 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-haptic: add check for haptic state"

parents a3e7b074 dbd85e08
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1102,9 +1102,13 @@ static void qpnp_hap_td_enable(struct timed_output_dev *dev, int value)
	mutex_lock(&hap->lock);
	hrtimer_cancel(&hap->hap_timer);

	if (value == 0)
	if (value == 0) {
		if (hap->state == 0) {
			mutex_unlock(&hap->lock);
			return;
		}
		hap->state = 0;
	else {
	} else {
		value = (value > hap->timeout_ms ?
				 hap->timeout_ms : value);
		hap->state = 1;