aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-01-28 09:22:24 -0500
committerMark Brown <broonie@kernel.org>2017-01-31 15:53:30 -0500
commit404826cb39fbe33998bec6ce5e1d51812b81bcda (patch)
tree1cb8b7dbd2eb170e6d6f98cc64cf7ac9acb72ef6
parentd00b74613fb18dfd0a5aa99270ee2e72d5c808d7 (diff)
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>
-rw-r--r--drivers/regulator/max77686-regulator.c8
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,
289 return 0; 289 return 0;
290} 290}
291 291
292static struct regulator_ops max77686_ops = { 292static const struct regulator_ops max77686_ops = {
293 .list_voltage = regulator_list_voltage_linear, 293 .list_voltage = regulator_list_voltage_linear,
294 .map_voltage = regulator_map_voltage_linear, 294 .map_voltage = regulator_map_voltage_linear,
295 .is_enabled = regulator_is_enabled_regmap, 295 .is_enabled = regulator_is_enabled_regmap,
@@ -301,7 +301,7 @@ static struct regulator_ops max77686_ops = {
301 .set_suspend_mode = max77686_set_suspend_mode, 301 .set_suspend_mode = max77686_set_suspend_mode,
302}; 302};
303 303
304static struct regulator_ops max77686_ldo_ops = { 304static const struct regulator_ops max77686_ldo_ops = {
305 .list_voltage = regulator_list_voltage_linear, 305 .list_voltage = regulator_list_voltage_linear,
306 .map_voltage = regulator_map_voltage_linear, 306 .map_voltage = regulator_map_voltage_linear,
307 .is_enabled = regulator_is_enabled_regmap, 307 .is_enabled = regulator_is_enabled_regmap,
@@ -314,7 +314,7 @@ static struct regulator_ops max77686_ldo_ops = {
314 .set_suspend_disable = max77686_set_suspend_disable, 314 .set_suspend_disable = max77686_set_suspend_disable,
315}; 315};
316 316
317static struct regulator_ops max77686_buck1_ops = { 317static const struct regulator_ops max77686_buck1_ops = {
318 .list_voltage = regulator_list_voltage_linear, 318 .list_voltage = regulator_list_voltage_linear,
319 .map_voltage = regulator_map_voltage_linear, 319 .map_voltage = regulator_map_voltage_linear,
320 .is_enabled = regulator_is_enabled_regmap, 320 .is_enabled = regulator_is_enabled_regmap,
@@ -326,7 +326,7 @@ static struct regulator_ops max77686_buck1_ops = {
326 .set_suspend_disable = max77686_set_suspend_disable, 326 .set_suspend_disable = max77686_set_suspend_disable,
327}; 327};
328 328
329static struct regulator_ops max77686_buck_dvs_ops = { 329static const struct regulator_ops max77686_buck_dvs_ops = {
330 .list_voltage = regulator_list_voltage_linear, 330 .list_voltage = regulator_list_voltage_linear,
331 .map_voltage = regulator_map_voltage_linear, 331 .map_voltage = regulator_map_voltage_linear,
332 .is_enabled = regulator_is_enabled_regmap, 332 .is_enabled = regulator_is_enabled_regmap,