diff options
| author | Patrick Mochel <mochel@osdl.org> | 2003-08-19 09:36:46 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2003-08-19 09:36:46 -0700 |
| commit | 0d045e1fa51a9686c2a0aba434dd2b0039a9aa3d (patch) | |
| tree | ecc14b1e8e85ab5865f3dad96f05cd43f770b9b6 /include/linux/device.h | |
| parent | 54050a4e1b5d6e97513237052c796ccb97fd90d9 (diff) | |
[power] Move suspend()/resume() methods.
Instead of putting them in struct device_driver (which few, if any drivers
use directly), put them in the controlling bus_type of the device (which
are currently responsible for claiming the methods and forwarding the calls
to the bus-specific driver anyway).
This will save 8 bytes per driver instance, which isn't that much, but it's
something. It also makes it more obvious to the reader what is going on.
And, it makes for easier bus-level defaults in the case the device has no
driver attached.
The old calls remain until all instances have been fixed up.
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index c99ad50c6784..8d6266f2e3c3 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -58,7 +58,8 @@ struct bus_type { struct device * (*add) (struct device * parent, char * bus_id); int (*hotplug) (struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size); - + int (*suspend)(struct device * dev, u32 state); + int (*resume)(struct device * dev); }; extern int bus_register(struct bus_type * bus); |
