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: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210206232152.58046-1-rikard.falkeborn@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Rikard Falkeborn 2021-02-07 00:21:52 +01:00 committed by Hans de Goede
parent bd69bcce4a
commit 0f1f7f22f3
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ static int dcon_regulator_is_enabled(struct regulator_dev *rdev)
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,
.disable = dcon_regulator_disable,
.is_enabled = dcon_regulator_is_enabled,