summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/mc13783-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/mc13783-regulator.c
parentad542a527c9a4d9088da3a0977c7508266229f07 (diff)
downloadlinux-e5680c4de3eb3ea5538d11733a91ccef19badd69.tar.bz2
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/mc13783-regulator.c')
-rw-r--r--drivers/regulator/mc13783-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index 887a1d1726ad..ab558b26cd7c 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -226,7 +226,7 @@ static const unsigned int mc13783_pwgtdrv_val[] = {
5500000,
};
-static struct regulator_ops mc13783_gpo_regulator_ops;
+static const struct regulator_ops mc13783_gpo_regulator_ops;
#define MC13783_DEFINE(prefix, name, node, reg, vsel_reg, voltages) \
MC13xxx_DEFINE(MC13783_REG_, name, node, reg, vsel_reg, voltages, \
@@ -380,7 +380,7 @@ static int mc13783_gpo_regulator_is_enabled(struct regulator_dev *rdev)
return (val & mc13xxx_regulators[id].enable_bit) != 0;
}
-static struct regulator_ops mc13783_gpo_regulator_ops = {
+static const struct regulator_ops mc13783_gpo_regulator_ops = {
.enable = mc13783_gpo_regulator_enable,
.disable = mc13783_gpo_regulator_disable,
.is_enabled = mc13783_gpo_regulator_is_enabled,