From: Rikard Falkeborn Date: Sat, 11 Jul 2020 11:44:09 +0000 (+0200) Subject: regulator: cros-ec: Constify cros_ec_regulator_voltage_ops X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~1185^2~26 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=308e65ad060dca2f0187731a7916c71521ce6c25;p=linux.git regulator: cros-ec: Constify cros_ec_regulator_voltage_ops It is never modified, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Acked-by: Pi-Hsun Shih Link: https://lore.kernel.org/r/20200711114409.9911-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/cros-ec-regulator.c b/drivers/regulator/cros-ec-regulator.c index 35f97246bc48..eeed5aac3f32 100644 --- a/drivers/regulator/cros-ec-regulator.c +++ b/drivers/regulator/cros-ec-regulator.c @@ -142,7 +142,7 @@ static int cros_ec_regulator_set_voltage(struct regulator_dev *dev, int min_uV, sizeof(cmd), NULL, 0); } -static struct regulator_ops cros_ec_regulator_voltage_ops = { +static const struct regulator_ops cros_ec_regulator_voltage_ops = { .enable = cros_ec_regulator_enable, .disable = cros_ec_regulator_disable, .is_enabled = cros_ec_regulator_is_enabled,