diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-03 01:08:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 10:57:29 -0700 |
commit | f89cbc399ecd924c4bd879344e662aace2274b4f (patch) | |
tree | d44c6c9952e1433566a3e6a4eb0123e33d10d97d /include/linux/device.h | |
parent | bf62456eb91f3d2ef0736081583d09b0b3c8b7ea (diff) | |
download | op-kernel-dev-f89cbc399ecd924c4bd879344e662aace2274b4f.zip op-kernel-dev-f89cbc399ecd924c4bd879344e662aace2274b4f.tar.gz |
Driver core: add suspend() and resume() to struct device_type
Driver core: add suspend() and resume() to struct device_type
In cases when there are devices of different types in the same class
we can't use class's implementation of suspend and resume methods and
we need to add them to struct device_type instead.
Also fix error handling in resume code (we should not try to call
class's resume method iof bus's resume method for the device failed.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index c9dc458..af603a1 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -344,6 +344,8 @@ struct device_type { int (*uevent)(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size); void (*release)(struct device *dev); + int (*suspend)(struct device * dev, pm_message_t state); + int (*resume)(struct device * dev); }; /* interface for exporting device attributes */ |