未验证 提交 308e65ad 编写于 作者: R Rikard Falkeborn 提交者: Mark Brown

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: NRikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: NPi-Hsun Shih <pihsun@chromium.org>
Link: https://lore.kernel.org/r/20200711114409.9911-1-rikard.falkeborn@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 a7c15187
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册