Commit bcf39c1e authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Mark Brown

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: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200617223247.25566-3-rikard.falkeborn@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent cae62a93
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment