diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2017-01-28 15:22:24 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-01-31 21:53:30 +0100 |
commit | 404826cb39fbe33998bec6ce5e1d51812b81bcda (patch) | |
tree | 1cb8b7dbd2eb170e6d6f98cc64cf7ac9acb72ef6 /drivers/regulator | |
parent | Merge remote-tracking branches 'regulator/topic/tps65086' and 'regulator/topi... (diff) | |
download | linux-404826cb39fbe33998bec6ce5e1d51812b81bcda.tar.xz linux-404826cb39fbe33998bec6ce5e1d51812b81bcda.zip |
regulator: max77686-regulator: constify regulator_ops structure
Declare regulator_ops structure as const as it is only stored in the ops
field of a regulator_desc structure. This field is of type const, so
regulator_ops structures having this property can be made const too.
File size before: drivers/regulator/max77686-regulator.o
text data bss dec hex filename
9904 1320 0 11224 2bd8 regulator/max77686-regulator.o
File size after: drivers/regulator/max77686-regulator.o
text data bss dec hex filename
10928 280 0 11208 2bc8 regulator/max77686-regulator.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/max77686-regulator.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/max77686-regulator.c b/drivers/regulator/max77686-regulator.c index ac4fa581e0a5..c301f3733475 100644 --- a/drivers/regulator/max77686-regulator.c +++ b/drivers/regulator/max77686-regulator.c @@ -289,7 +289,7 @@ static int max77686_of_parse_cb(struct device_node *np, return 0; } -static struct regulator_ops max77686_ops = { +static const struct regulator_ops max77686_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -301,7 +301,7 @@ static struct regulator_ops max77686_ops = { .set_suspend_mode = max77686_set_suspend_mode, }; -static struct regulator_ops max77686_ldo_ops = { +static const struct regulator_ops max77686_ldo_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -314,7 +314,7 @@ static struct regulator_ops max77686_ldo_ops = { .set_suspend_disable = max77686_set_suspend_disable, }; -static struct regulator_ops max77686_buck1_ops = { +static const struct regulator_ops max77686_buck1_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -326,7 +326,7 @@ static struct regulator_ops max77686_buck1_ops = { .set_suspend_disable = max77686_set_suspend_disable, }; -static struct regulator_ops max77686_buck_dvs_ops = { +static const struct regulator_ops max77686_buck_dvs_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, |