Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rikard Falkeborn and committed by
Mark Brown
cae62a93 0ac87aed

+1 -1
+1 -1
drivers/regulator/anatop-regulator.c
··· 139 139 .map_voltage = regulator_map_voltage_linear, 140 140 }; 141 141 142 - static struct regulator_ops anatop_core_rops = { 142 + static const struct regulator_ops anatop_core_rops = { 143 143 .enable = anatop_regmap_enable, 144 144 .disable = anatop_regmap_disable, 145 145 .is_enabled = anatop_regmap_is_enabled,