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

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

Merge "drivers: qcom: system_pm: Set infinite sleep if sleep time is 0" into msm-4.9

parents da07aa84 d09e0e06
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -56,9 +56,13 @@ int system_sleep_enter(uint64_t sleep_val)
	 * Set up the wake up value offset from the current time.
	 * Convert us to ns to allow div by 19.2 Mhz tick timer.
	 */
	if (sleep_val) {
		sleep_val *= NSEC_PER_USEC;
		do_div(sleep_val, NSEC_PER_SEC/ARCH_TIMER_HZ);
		sleep_val += arch_counter_get_cntvct();
	} else {
		sleep_val = ~0ULL;
	}

	return setup_wakeup(sleep_val);
}