[PATCH]Enabling Auto poweron after power is restored.

Olof Johansson olof at lixom.net
Thu Feb 8 03:59:01 EST 2007


On Fri, Feb 02, 2007 at 10:16:23PM -0600, Manish Ahuja wrote:
> Resubmitting this patch with a sysfs interface instead of /proc.
> During some off line discussion, /sys/power was suggested as a possible 
> candidate area for this functionality to reside.

Minor nitpick since you have to respin based on Paul's comments anyway...

>  void rtas_power_off(void)
>  {
> +	int rc;
> +	int rtas_poweroff_ups_token = rtas_token("ibm,power-off-ups");
> +
>  	if (rtas_flash_term_hook)
> -		rtas_flash_term_hook(SYS_POWER_OFF);
> -	/* allow power on only with power button press */
> -	printk("RTAS power-off returned %d\n",
> -	       rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
> +	rtas_flash_term_hook(SYS_POWER_OFF);

Looks like you have an if (rtas_flash_term_hook) with an unindented line
right after it.



-Olof



More information about the Linuxppc-dev mailing list