regulator: tps65217: Constify regulator_ops
authorAxel Lin <axel.lin@ingics.com>
Sun, 24 Mar 2019 06:00:05 +0000 (14:00 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 25 Mar 2019 12:21:29 +0000 (12:21 +0000)
These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/tps65217-regulator.c

index ada62f792258a951a5d1f10e52704ea26ff87d2f..b0f5d8dcd7414c38c0ae1af296f4edd704ec3028 100644 (file)
@@ -149,7 +149,7 @@ static int tps65217_pmic_set_suspend_disable(struct regulator_dev *dev)
 }
 
 /* Operations permitted on DCDCx, LDO2, LDO3 and LDO4 */
-static struct regulator_ops tps65217_pmic_ops = {
+static const struct regulator_ops tps65217_pmic_ops = {
        .is_enabled             = regulator_is_enabled_regmap,
        .enable                 = tps65217_pmic_enable,
        .disable                = tps65217_pmic_disable,
@@ -162,7 +162,7 @@ static struct regulator_ops tps65217_pmic_ops = {
 };
 
 /* Operations permitted on LDO1 */
-static struct regulator_ops tps65217_pmic_ldo1_ops = {
+static const struct regulator_ops tps65217_pmic_ldo1_ops = {
        .is_enabled             = regulator_is_enabled_regmap,
        .enable                 = tps65217_pmic_enable,
        .disable                = tps65217_pmic_disable,