diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-07-25 07:11:32 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-07-25 07:11:32 +0200 |
commit | 8150f32b90f630ad3e460f026ce338cb81685bc9 (patch) | |
tree | 691fb27f26e783e39f01d2effb9e35f7f461964f /include | |
parent | Input: bf54x-keys - convert printk() to dev_*() (diff) | |
download | linux-8150f32b90f630ad3e460f026ce338cb81685bc9.tar.xz linux-8150f32b90f630ad3e460f026ce338cb81685bc9.zip |
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 { int (*suspend)(struct device *dev, pm_message_t state); int (*resume)(struct device *dev); - struct dev_pm_ops *pm; + const struct dev_pm_ops *pm; struct bus_type_private *p; }; @@ -132,7 +132,7 @@ struct device_driver { int (*resume) (struct device *dev); struct attribute_group **groups; - struct dev_pm_ops *pm; + const struct dev_pm_ops *pm; struct driver_private *p; }; @@ -200,7 +200,8 @@ struct class { int (*suspend)(struct device *dev, pm_message_t state); int (*resume)(struct device *dev); - struct dev_pm_ops *pm; + const struct dev_pm_ops *pm; + struct class_private *p; }; @@ -291,7 +292,7 @@ struct device_type { char *(*nodename)(struct device *dev); void (*release)(struct device *dev); - struct dev_pm_ops *pm; + const struct dev_pm_ops *pm; }; /* interface for exporting device attributes */ |