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>
This commit is contained in:
Dmitry Torokhov
2009-07-24 22:11:32 -07:00
parent 11a7926091
commit 8150f32b90
4 changed files with 19 additions and 16 deletions

View File

@@ -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 */