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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user