aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-24 22:11:32 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-24 22:11:32 -0700
commit8150f32b90f630ad3e460f026ce338cb81685bc9 (patch)
tree691fb27f26e783e39f01d2effb9e35f7f461964f /drivers/base
parent11a79260916b00bcfe1bcfbd7a994321ee25b880 (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 'drivers/base')
-rw-r--r--drivers/base/platform.c2
-rw-r--r--drivers/base/power/main.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 81cb01bfc35..c4b3fcee17b 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -925,7 +925,7 @@ static int platform_pm_restore_noirq(struct device *dev)
#endif /* !CONFIG_HIBERNATION */
-static struct dev_pm_ops platform_dev_pm_ops = {
+static const struct dev_pm_ops platform_dev_pm_ops = {
.prepare = platform_pm_prepare,
.complete = platform_pm_complete,
.suspend = platform_pm_suspend,
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 58a3e572f2c..1b1a786b7de 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -157,8 +157,9 @@ void device_pm_move_last(struct device *dev)
* @ops: PM operations to choose from.
* @state: PM transition of the system being carried out.
*/
-static int pm_op(struct device *dev, struct dev_pm_ops *ops,
- pm_message_t state)
+static int pm_op(struct device *dev,
+ const struct dev_pm_ops *ops,
+ pm_message_t state)
{
int error = 0;
@@ -220,7 +221,8 @@ static int pm_op(struct device *dev, struct dev_pm_ops *ops,
* The operation is executed with interrupts disabled by the only remaining
* functional CPU in the system.
*/
-static int pm_noirq_op(struct device *dev, struct dev_pm_ops *ops,
+static int pm_noirq_op(struct device *dev,
+ const struct dev_pm_ops *ops,
pm_message_t state)
{
int error = 0;