staging: ccree: constify dev_pm_ops structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 8 Aug 2017 09:23:59 +0000 (14:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2017 22:10:42 +0000 (15:10 -0700)
dev_pm_ops are not supposed to change at runtime. All functions
working with dev_pm_ops provided by <linux/device.h> work with const
dev_pm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ccree/ssi_driver.c

index 88b68c81556ca8dd7469d37055f3b0f6f6f641a7..9c6f1200c130a037ddde1a1cbd6916454cc1ea8e 100644 (file)
@@ -550,7 +550,7 @@ static int cc7x_remove(struct platform_device *plat_dev)
 }
 
 #if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
-static struct dev_pm_ops arm_cc7x_driver_pm = {
+static const struct dev_pm_ops arm_cc7x_driver_pm = {
        SET_RUNTIME_PM_OPS(ssi_power_mgr_runtime_suspend, ssi_power_mgr_runtime_resume, NULL)
 };
 #endif