]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
regulator: gpio: Constify regulator_ops
authorAxel Lin <axel.lin@ingics.com>
Fri, 8 Mar 2019 06:15:29 +0000 (14:15 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 13 Mar 2019 15:09:44 +0000 (15:09 +0000)
gpio_regulator_voltage_ops and gpio_regulator_current_ops should never
change, make them const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/gpio-regulator.c

index 967338bf1dc14f72f53337fbc88b4d44f0da8aa1..f50d86a661382b9c07eb74101fbba016412297f9 100644 (file)
@@ -124,7 +124,7 @@ static int gpio_regulator_set_current_limit(struct regulator_dev *dev,
        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,
        .set_voltage = gpio_regulator_set_voltage,
        .list_voltage = gpio_regulator_list_voltage,
@@ -220,7 +220,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np,
        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,
        .set_current_limit = gpio_regulator_set_current_limit,
 };