Skip to content

Commit

Permalink
regulator: cros-ec: Constify cros_ec_regulator_voltage_ops
Browse files Browse the repository at this point in the history
It is never modified, so make it const to allow the compiler to put it
in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Pi-Hsun Shih <pihsun@chromium.org>
Link: https://lore.kernel.org/r/20200711114409.9911-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Rikard Falkeborn authored and Mark Brown committed Jul 13, 2020
1 parent a7c1518 commit 308e65a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/cros-ec-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 308e65a

Please sign in to comment.