Commit 705e2a90 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: gpio: Constify regulator_ops

gpio_regulator_voltage_ops and gpio_regulator_current_ops should never
change, make them const.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7cdc2ee7
...@@ -124,7 +124,7 @@ static int gpio_regulator_set_current_limit(struct regulator_dev *dev, ...@@ -124,7 +124,7 @@ static int gpio_regulator_set_current_limit(struct regulator_dev *dev,
return 0; return 0;
} }
static struct regulator_ops gpio_regulator_voltage_ops = { static const struct regulator_ops gpio_regulator_voltage_ops = {
.get_voltage = gpio_regulator_get_value, .get_voltage = gpio_regulator_get_value,
.set_voltage = gpio_regulator_set_voltage, .set_voltage = gpio_regulator_set_voltage,
.list_voltage = gpio_regulator_list_voltage, .list_voltage = gpio_regulator_list_voltage,
...@@ -220,7 +220,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np, ...@@ -220,7 +220,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np,
return config; return config;
} }
static struct regulator_ops gpio_regulator_current_ops = { static const struct regulator_ops gpio_regulator_current_ops = {
.get_current_limit = gpio_regulator_get_value, .get_current_limit = gpio_regulator_get_value,
.set_current_limit = gpio_regulator_set_current_limit, .set_current_limit = gpio_regulator_set_current_limit,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment