Unverified Commit 308e65ad authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Mark Brown
Browse files

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: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: default avatarPi-Hsun Shih <pihsun@chromium.org>
Link: https://lore.kernel.org/r/20200711114409.9911-1-rikard.falkeborn@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a7c15187
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,