[linux-pm] [PATCH 03/13] PM: Implement wakelock api.

Alan Stern stern at rowland.harvard.edu
Thu Feb 5 07:24:18 PST 2009


On Wed, 4 Feb 2009, [utf-8] Arve Hjønnevåg wrote:

> --- a/kernel/power/Kconfig
> +++ b/kernel/power/Kconfig
> @@ -116,6 +116,25 @@ config SUSPEND_FREEZER
>  
>  	  Turning OFF this setting is NOT recommended! If in doubt, say Y.
>  
> +config HAS_WAKELOCK
> +	bool
> +
> +config WAKELOCK
> +	bool "Wake lock"
> +	depends on PM && RTC_CLASS
> +	default n
> +	select HAS_WAKELOCK
> +	---help---
> +	  Enable wakelocks. When user space request a sleep state the
> +	  sleep request will be delayed until no wake locks are held.

You know, when submitting multiple patches it is customary to break the 
code up in such a way that intermediate forms (where some of the 
patches have been applied but not all of them) will compile and run 
correctly.  This is so that people will be able to carry out bisection 
searches while looking for other bugs.

Right here we see that you introduce CONFIG_WAKELOCK in patch 03/13, 
but it gets used already in patch 01/13.  That's not good.

One other thing -- this may be a standard Kconfig idiom, but what 
reason is there for CONFIG_HAS_WAKELOCK?  Does it get used anywhere?  
It if does, couldn't CONFIG_WAKELOCK be used instead?

Alan Stern



More information about the linux-pm mailing list