diff options
| author | Patrick Mochel <mochel@osdl.org> | 2003-08-19 09:23:34 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2003-08-19 09:23:34 -0700 |
| commit | 54050a4e1b5d6e97513237052c796ccb97fd90d9 (patch) | |
| tree | a55726c9f3339b27045b04579ec641d84aa1d51f /include/linux | |
| parent | 72a4a1790e1b2ae9c6f450144e3c733ae303ad23 (diff) | |
[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.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 2 | ||||
| -rw-r--r-- | include/linux/sysdev.h | 4 |
2 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 7b49400adf31..c99ad50c6784 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -372,8 +372,6 @@ extern struct bus_type platform_bus_type; extern struct device legacy_bus; /* drivers/base/power.c */ -extern int device_suspend(u32 state, u32 level); -extern void device_resume(u32 level); extern void device_shutdown(void); diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 4bc3e22b5104..2a90db8d41de 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h @@ -31,10 +31,8 @@ struct sysdev_class { /* Default operations for these types of devices */ int (*shutdown)(struct sys_device *); - int (*save)(struct sys_device *, u32 state); int (*suspend)(struct sys_device *, u32 state); int (*resume)(struct sys_device *); - int (*restore)(struct sys_device *); struct kset kset; }; @@ -52,10 +50,8 @@ struct sysdev_driver { int (*add)(struct sys_device *); int (*remove)(struct sys_device *); int (*shutdown)(struct sys_device *); - int (*save)(struct sys_device *, u32 state); int (*suspend)(struct sys_device *, u32 state); int (*resume)(struct sys_device *); - int (*restore)(struct sys_device *); }; |
