From 0d045e1fa51a9686c2a0aba434dd2b0039a9aa3d Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Tue, 19 Aug 2003 09:36:46 -0700 Subject: [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. --- include/linux/device.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') 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); -- cgit v1.2.3