regulator: slg51000: Constify slg51000_regl_ops and slg51000_switch_ops
authorAxel Lin <axel.lin@ingics.com>
Fri, 24 May 2019 10:02:46 +0000 (18:02 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 24 May 2019 12:04:23 +0000 (13:04 +0100)
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/slg51000-regulator.c

index 12e21d43030ba8087215bda76bb7415194bcd664..a06a18f220e094da7bd8021711341e321e56e2ec 100644 (file)
@@ -183,7 +183,7 @@ static const struct regmap_config slg51000_regmap_config = {
        .volatile_table = &slg51000_volatile_table,
 };
 
-static struct regulator_ops slg51000_regl_ops = {
+static const struct regulator_ops slg51000_regl_ops = {
        .enable = regulator_enable_regmap,
        .disable = regulator_disable_regmap,
        .is_enabled = regulator_is_enabled_regmap,
@@ -193,7 +193,7 @@ static struct regulator_ops slg51000_regl_ops = {
        .set_voltage_sel = regulator_set_voltage_sel_regmap,
 };
 
-static struct regulator_ops slg51000_switch_ops = {
+static const struct regulator_ops slg51000_switch_ops = {
        .enable = regulator_enable_regmap,
        .disable = regulator_disable_regmap,
        .is_enabled = regulator_is_enabled_regmap,