]> git.hungrycats.org Git - linux/commit
[power] Update device handling.
authorPatrick Mochel <mochel@osdl.org>
Tue, 19 Aug 2003 16:23:34 +0000 (09:23 -0700)
committerPatrick Mochel <mochel@osdl.org>
Tue, 19 Aug 2003 16:23:34 +0000 (09:23 -0700)
commit54050a4e1b5d6e97513237052c796ccb97fd90d9
treea55726c9f3339b27045b04579ec641d84aa1d51f
parent72a4a1790e1b2ae9c6f450144e3c733ae303ad23
[power] Update device handling.

- From conversations with Ben Herrenschmidt.

Most devices should be able to handle powering down with interrupts enabled,
which I already assume. But since suspending will stop I/O transactions
before the call to power it off (making the device unusable anyway), there
is no need to separate the calls - we may as well make it simpler for
driver authors and require that driver authors do everything at the same
time.

There will always be devices that need to either power down or power up the
device with interrupts disabled. They will get called with interrupts
enabled, but may return -EAGAIN to be called again with interrupts disabled
to do what they need to do.

System devices are now always called only with interrupts disabled. Come
on - they're system devices. Of course we need interrupts disabled.
drivers/base/power/main.c
drivers/base/power/power.h
drivers/base/power/resume.c
drivers/base/power/runtime.c
drivers/base/power/suspend.c
drivers/base/sys.c
include/linux/device.h
include/linux/sysdev.h
kernel/power/main.c