Re: [PATCH] OLPC: Add XO-1 poweroff support

From: Andres Salomon
Date: Thu Oct 07 2010 - 17:18:14 EST


On Thu, 7 Oct 2010 21:42:59 +0100
Daniel Drake <dsd@xxxxxxxxxx> wrote:

> On 7 October 2010 21:09, Andres Salomon <dilinger@xxxxxxxxxx> wrote:
> > Any particular reason why this can't be modular?
>
> Because of the pm_power_off thing.
> Also, a similar situation would be encountered with set_suspend_ops().
>
> I don't really understand your suggestion. If we set it to NULL on
> module unload then the power off would crash on shutdown, right?
>
> Daniel


See arch/x86/kernel/apm_32.c for an example of modular pm_power_off
handling.

Power off shouldn't crash; at least, native_machine_power_off first
check if pm_power_off is !NULL before calling it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/