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

Commit e83699bc 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 ecd9b335 b215aaf7
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -2189,8 +2189,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;
}
@@ -2288,8 +2291,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;
}
@@ -2762,13 +2768,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;