diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2021-02-07 00:21:52 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-02-08 16:59:21 +0100 |
commit | 0f1f7f22f384f34b2f0800a3734aa0fc83eafff2 (patch) | |
tree | 577f147750642ccd40b243b0aea3ce8e685e0508 /drivers/platform | |
parent | bd69bcce4aa089435e2891222236b1cb20395bec (diff) | |
download | linux-0f1f7f22f384f34b2f0800a3734aa0fc83eafff2.tar.bz2 |
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/olpc/olpc-ec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/olpc/olpc-ec.c b/drivers/platform/olpc/olpc-ec.c index 72dbbea0005c..4ff5c3a12991 100644 --- a/drivers/platform/olpc/olpc-ec.c +++ b/drivers/platform/olpc/olpc-ec.c @@ -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, |