aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-12-19 10:43:22 -0500
committerMark Brown <broonie@kernel.org>2015-12-22 19:01:23 -0500
commit95dfead1ddb8e529b24a6a98e026d1886f3c0bdf (patch)
treeae9d94efef67218e70ca2606be227974a16dfabc
parent7629cef11200bccb63ce5a629a4d0602e7f85555 (diff)
regulator: lp8788: constify regulator_ops structures
The regulator_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/lp8788-buck.c4
-rw-r--r--drivers/regulator/lp8788-ldo.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c
index a97bed90d39b..ec46290b647e 100644
--- a/drivers/regulator/lp8788-buck.c
+++ b/drivers/regulator/lp8788-buck.c
@@ -344,7 +344,7 @@ static unsigned int lp8788_buck_get_mode(struct regulator_dev *rdev)
344 REGULATOR_MODE_FAST : REGULATOR_MODE_NORMAL; 344 REGULATOR_MODE_FAST : REGULATOR_MODE_NORMAL;
345} 345}
346 346
347static struct regulator_ops lp8788_buck12_ops = { 347static const struct regulator_ops lp8788_buck12_ops = {
348 .list_voltage = regulator_list_voltage_table, 348 .list_voltage = regulator_list_voltage_table,
349 .map_voltage = regulator_map_voltage_ascend, 349 .map_voltage = regulator_map_voltage_ascend,
350 .set_voltage_sel = lp8788_buck12_set_voltage_sel, 350 .set_voltage_sel = lp8788_buck12_set_voltage_sel,
@@ -357,7 +357,7 @@ static struct regulator_ops lp8788_buck12_ops = {
357 .get_mode = lp8788_buck_get_mode, 357 .get_mode = lp8788_buck_get_mode,
358}; 358};
359 359
360static struct regulator_ops lp8788_buck34_ops = { 360static const struct regulator_ops lp8788_buck34_ops = {
361 .list_voltage = regulator_list_voltage_table, 361 .list_voltage = regulator_list_voltage_table,
362 .map_voltage = regulator_map_voltage_ascend, 362 .map_voltage = regulator_map_voltage_ascend,
363 .set_voltage_sel = regulator_set_voltage_sel_regmap, 363 .set_voltage_sel = regulator_set_voltage_sel_regmap,
diff --git a/drivers/regulator/lp8788-ldo.c b/drivers/regulator/lp8788-ldo.c
index 30e28b131126..cbfd35873575 100644
--- a/drivers/regulator/lp8788-ldo.c
+++ b/drivers/regulator/lp8788-ldo.c
@@ -170,7 +170,7 @@ static int lp8788_ldo_enable_time(struct regulator_dev *rdev)
170 return ENABLE_TIME_USEC * val; 170 return ENABLE_TIME_USEC * val;
171} 171}
172 172
173static struct regulator_ops lp8788_ldo_voltage_table_ops = { 173static const struct regulator_ops lp8788_ldo_voltage_table_ops = {
174 .list_voltage = regulator_list_voltage_table, 174 .list_voltage = regulator_list_voltage_table,
175 .set_voltage_sel = regulator_set_voltage_sel_regmap, 175 .set_voltage_sel = regulator_set_voltage_sel_regmap,
176 .get_voltage_sel = regulator_get_voltage_sel_regmap, 176 .get_voltage_sel = regulator_get_voltage_sel_regmap,
@@ -180,7 +180,7 @@ static struct regulator_ops lp8788_ldo_voltage_table_ops = {
180 .enable_time = lp8788_ldo_enable_time, 180 .enable_time = lp8788_ldo_enable_time,
181}; 181};
182 182
183static struct regulator_ops lp8788_ldo_voltage_fixed_ops = { 183static const struct regulator_ops lp8788_ldo_voltage_fixed_ops = {
184 .list_voltage = regulator_list_voltage_linear, 184 .list_voltage = regulator_list_voltage_linear,
185 .enable = regulator_enable_regmap, 185 .enable = regulator_enable_regmap,
186 .disable = regulator_disable_regmap, 186 .disable = regulator_disable_regmap,