Messages in this thread | | | Date | Thu, 7 Oct 2010 14:20:03 -0700 | From | Andres Salomon <> | Subject | Re: [PATCH] OLPC: Add XO-1 poweroff support |
| |
On Thu, 7 Oct 2010 21:42:59 +0100 Daniel Drake <dsd@laptop.org> wrote:
> On 7 October 2010 21:09, Andres Salomon <dilinger@queued.net> 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.
| |