summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-06-18 00:32:43 +0200
committerMark Brown <broonie@kernel.org>2020-06-18 13:47:31 +0100
commitcae62a937912bd4b3faf8e268cc0ffcf00ec5850 (patch)
treee4b55ef6f47729ea12b4933a98183d1579a70cdb
parent0ac87aed5b5ddf734423505b73ce815d67a20113 (diff)
regulator: anatop: Constify anatop_core_rops
anatop_core_rops is not modified and can therefore be made const which allows the compiler to put it in read-only memory. Before: text data bss dec hex filename 4502 412 0 4914 1332 drivers/regulator/anatop-regulator.o After: text data bss dec hex filename 4634 280 0 4914 1332 drivers/regulator/anatop-regulator.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200617223247.25566-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/anatop-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index ca92b3de0e9c..f9856d4e295f 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -139,7 +139,7 @@ static struct regulator_ops anatop_rops = {
.map_voltage = regulator_map_voltage_linear,
};
-static struct regulator_ops anatop_core_rops = {
+static const struct regulator_ops anatop_core_rops = {
.enable = anatop_regmap_enable,
.disable = anatop_regmap_disable,
.is_enabled = anatop_regmap_is_enabled,