Re: [PATCH 8/9] PM: suspend_block: Add timeout support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Arve Hjønnevåg wrote:
[snip]> Add suspend_block_timeout to block suspend for a limited time.>> Signed-off-by: Arve Hjønnevåg <arve@xxxxxxxxxxx>> ---> +static DEFINE_TIMER(expire_timer, expire_suspend_blockers, 0, 0);> +> +static void update_suspend(struct suspend_blocker *blocker, long max_timeout)> +{> +	if (max_timeout > 0) {> +		if (debug_mask & DEBUG_EXPIRE)> +			pr_info("suspend_blocker: %s, start expire timer, "> +				"%ld\n", blocker->name, max_timeout);> +		mod_timer(&expire_timer, jiffies + max_timeout);> +	} else {> +		if (del_timer(&expire_timer))> +			if (debug_mask & DEBUG_EXPIRE)> +				pr_info("suspend_blocker: %s, stop expire "> +					"timer\n", blocker->name);> +		if (max_timeout == 0)>   So the max_timeout can be negative?> +Michael_______________________________________________linux-pm mailing listlinux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux