summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-06-18 01:32:44 +0300
committerMark Brown <broonie@kernel.org>2020-06-18 15:47:32 +0300
commitbcf39c1eb1e059ec612bf06f4aa7b3972dcc85e8 (patch)
treee346f869874a90c39450d66698551d35caf633e6 /drivers/regulator
parentcae62a937912bd4b3faf8e268cc0ffcf00ec5850 (diff)
downloadlinux-bcf39c1eb1e059ec612bf06f4aa7b3972dcc85e8.tar.xz
regulator: cpcap: Constify cpcap_regulator_ops
cpcap_regulator_ops is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 14472 236 0 14708 3974 drivers/regulator/cpcap-regulator.o After: text data bss dec hex filename 14604 104 0 14708 3974 drivers/regulator/cpcap-regulator.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200617223247.25566-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/cpcap-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/cpcap-regulator.c b/drivers/regulator/cpcap-regulator.c
index f80781d58a28..14642603e755 100644
--- a/drivers/regulator/cpcap-regulator.c
+++ b/drivers/regulator/cpcap-regulator.c
@@ -256,7 +256,7 @@ static int cpcap_regulator_set_mode(struct regulator_dev *rdev,
CPCAP_BIT_AUDIO_LOW_PWR, value);
}
-static struct regulator_ops cpcap_regulator_ops = {
+static const struct regulator_ops cpcap_regulator_ops = {
.enable = cpcap_regulator_enable,
.disable = cpcap_regulator_disable,
.is_enabled = regulator_is_enabled_regmap,