diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-07-25 01:11:32 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-07-25 01:11:32 -0400 |
commit | 8150f32b90f630ad3e460f026ce338cb81685bc9 (patch) | |
tree | 691fb27f26e783e39f01d2effb9e35f7f461964f /include | |
parent | 11a79260916b00bcfe1bcfbd7a994321ee25b880 (diff) |
Driver Core: Make PM operations a const pointer
They are not supposed to be modified by drivers, so make them const.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index aebb81036db2..a28642975053 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -62,7 +62,7 @@ struct bus_type { | |||
62 | int (*suspend)(struct device *dev, pm_message_t state); | 62 | int (*suspend)(struct device *dev, pm_message_t state); |
63 | int (*resume)(struct device *dev); | 63 | int (*resume)(struct device *dev); |
64 | 64 | ||
65 | struct dev_pm_ops *pm; | 65 | const struct dev_pm_ops *pm; |
66 | 66 | ||
67 | struct bus_type_private *p; | 67 | struct bus_type_private *p; |
68 | }; | 68 | }; |
@@ -132,7 +132,7 @@ struct device_driver { | |||
132 | int (*resume) (struct device *dev); | 132 | int (*resume) (struct device *dev); |
133 | struct attribute_group **groups; | 133 | struct attribute_group **groups; |
134 | 134 | ||
135 | struct dev_pm_ops *pm; | 135 | const struct dev_pm_ops *pm; |
136 | 136 | ||
137 | struct driver_private *p; | 137 | struct driver_private *p; |
138 | }; | 138 | }; |
@@ -200,7 +200,8 @@ struct class { | |||
200 | int (*suspend)(struct device *dev, pm_message_t state); | 200 | int (*suspend)(struct device *dev, pm_message_t state); |
201 | int (*resume)(struct device *dev); | 201 | int (*resume)(struct device *dev); |
202 | 202 | ||
203 | struct dev_pm_ops *pm; | 203 | const struct dev_pm_ops *pm; |
204 | |||
204 | struct class_private *p; | 205 | struct class_private *p; |
205 | }; | 206 | }; |
206 | 207 | ||
@@ -291,7 +292,7 @@ struct device_type { | |||
291 | char *(*nodename)(struct device *dev); | 292 | char *(*nodename)(struct device *dev); |
292 | void (*release)(struct device *dev); | 293 | void (*release)(struct device *dev); |
293 | 294 | ||
294 | struct dev_pm_ops *pm; | 295 | const struct dev_pm_ops *pm; |
295 | }; | 296 | }; |
296 | 297 | ||
297 | /* interface for exporting device attributes */ | 298 | /* interface for exporting device attributes */ |