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

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

Merge "thermal: qpnp-adc-tm: Fix aborting suspend"

parents 706f38ff 336fff47
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -1320,8 +1320,11 @@ static int qpnp_adc_tm_disable_rearm_high_thresholds(
		return rc;
	}

	queue_work(chip->sensor[sensor_num].req_wq,
				&chip->sensor[sensor_num].work);
	if (!queue_work(chip->sensor[sensor_num].req_wq,
				&chip->sensor[sensor_num].work)) {
		/* The item is already queued, reduce the count */
		atomic_dec(&chip->wq_cnt);
	}

	return rc;
}
@@ -1408,8 +1411,11 @@ static int qpnp_adc_tm_disable_rearm_low_thresholds(
		return rc;
	}

	queue_work(chip->sensor[sensor_num].req_wq,
				&chip->sensor[sensor_num].work);
	if (!queue_work(chip->sensor[sensor_num].req_wq,
				&chip->sensor[sensor_num].work)) {
		/* The item is already queued, reduce the count */
		atomic_dec(&chip->wq_cnt);
	}

	return rc;
}
@@ -1625,13 +1631,14 @@ static irqreturn_t qpnp_adc_tm_rc_thr_isr(int irq, void *data)
	}

	if (sensor_low_notify_num) {
		if (queue_work(chip->low_thr_wq, &chip->trigger_low_thr_work))
			atomic_inc(&chip->wq_cnt);
		queue_work(chip->low_thr_wq, &chip->trigger_low_thr_work);
	}

	if (sensor_high_notify_num) {
		if (queue_work(chip->high_thr_wq,
				&chip->trigger_high_thr_work))
			atomic_inc(&chip->wq_cnt);
		queue_work(chip->high_thr_wq, &chip->trigger_high_thr_work);
	}

	return IRQ_HANDLED;