Commit 0f1f7f22 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Hans de Goede

Platform: OLPC: Constify static struct regulator_ops

The only usage of it is to assign its address to the ops field in the
regulator_desc struct, which is a pointer to const struct regulator_ops.
Make it const to allow the compiler to put it in read-only memory.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210206232152.58046-1-rikard.falkeborn@gmail.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent bd69bcce
...@@ -386,7 +386,7 @@ static int dcon_regulator_is_enabled(struct regulator_dev *rdev) ...@@ -386,7 +386,7 @@ static int dcon_regulator_is_enabled(struct regulator_dev *rdev)
return ec->dcon_enabled ? 1 : 0; return ec->dcon_enabled ? 1 : 0;
} }
static struct regulator_ops dcon_regulator_ops = { static const struct regulator_ops dcon_regulator_ops = {
.enable = dcon_regulator_enable, .enable = dcon_regulator_enable,
.disable = dcon_regulator_disable, .disable = dcon_regulator_disable,
.is_enabled = dcon_regulator_is_enabled, .is_enabled = dcon_regulator_is_enabled,
......
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