summaryrefslogtreecommitdiff
path: root/drivers/regulator/mc13892-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2019-03-01 22:20:53 +0800
committerMark Brown <broonie@kernel.org>2019-03-04 00:01:08 +0000
commite5680c4de3eb3ea5538d11733a91ccef19badd69 (patch)
tree0b210b791fda0cef6d8a2fd6bb65ea8361103c61 /drivers/regulator/mc13892-regulator.c
parentad542a527c9a4d9088da3a0977c7508266229f07 (diff)
downloadlwn-e5680c4de3eb3ea5538d11733a91ccef19badd69.tar.gz
lwn-e5680c4de3eb3ea5538d11733a91ccef19badd69.zip
regulator: mc13xxx: Constify regulator_ops variables
These regulator_ops variables should never change, make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/mc13892-regulator.c')
-rw-r--r--drivers/regulator/mc13892-regulator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index b55894980066..a731e826a037 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -242,8 +242,8 @@ static const unsigned int mc13892_pwgtdrv[] = {
5000000,
};
-static struct regulator_ops mc13892_gpo_regulator_ops;
-static struct regulator_ops mc13892_sw_regulator_ops;
+static const struct regulator_ops mc13892_gpo_regulator_ops;
+static const struct regulator_ops mc13892_sw_regulator_ops;
#define MC13892_FIXED_DEFINE(name, node, reg, voltages) \
@@ -387,7 +387,7 @@ static int mc13892_gpo_regulator_is_enabled(struct regulator_dev *rdev)
}
-static struct regulator_ops mc13892_gpo_regulator_ops = {
+static const struct regulator_ops mc13892_gpo_regulator_ops = {
.enable = mc13892_gpo_regulator_enable,
.disable = mc13892_gpo_regulator_disable,
.is_enabled = mc13892_gpo_regulator_is_enabled,
@@ -479,7 +479,7 @@ static int mc13892_sw_regulator_set_voltage_sel(struct regulator_dev *rdev,
return ret;
}
-static struct regulator_ops mc13892_sw_regulator_ops = {
+static const struct regulator_ops mc13892_sw_regulator_ops = {
.list_voltage = regulator_list_voltage_table,
.map_voltage = regulator_map_voltage_ascend,
.set_voltage_sel = mc13892_sw_regulator_set_voltage_sel,