summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-09-13 11:41:14 +0300
committerMark Brown <broonie@kernel.org>2020-09-14 16:24:40 +0300
commit2b37a18b58ed12b711591ec54c2b2a0e2068cf6e (patch)
tree5c4b511c40f52bb258c7c7879ce22b0889771491
parent72f2746c52e3fa6c0f6740df2d4fb70419533084 (diff)
downloadlinux-2b37a18b58ed12b711591ec54c2b2a0e2068cf6e.tar.xz
regulator: ti-abb: Constify ti_abb_reg_ops
The only usage of ti_abb_reg_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200913084114.8851-6-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/ti-abb-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c
index af9abcd9c166..3e60bff76194 100644
--- a/drivers/regulator/ti-abb-regulator.c
+++ b/drivers/regulator/ti-abb-regulator.c
@@ -619,7 +619,7 @@ check_abb:
return 0;
}
-static struct regulator_ops ti_abb_reg_ops = {
+static const struct regulator_ops ti_abb_reg_ops = {
.list_voltage = regulator_list_voltage_table,
.set_voltage_sel = ti_abb_set_voltage_sel,