aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-01-28 10:08:57 -0500
committerMark Brown <broonie@kernel.org>2017-01-31 15:58:27 -0500
commite5053853d8d7cd37275cc964bbc929e9e3c44c46 (patch)
treee6c5dec0f3fad271871c807346ded6f5f86cfbfb
parentd00b74613fb18dfd0a5aa99270ee2e72d5c808d7 (diff)
regulator: pfuze100-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/pfuze100-regulator.o text data bss dec hex filename 3552 12528 16 16096 3ee0 regulator/pfuze100-regulator.o File size after: drivers/regulator/pfuze100-regulator.o text data bss dec hex filename 4576 11496 16 16088 3ed8 regulator/pfuze100-regulator.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/pfuze100-regulator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index cb18b5c4f2db..e193bbbb8ffc 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -126,7 +126,7 @@ static int pfuze100_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
126 return ret; 126 return ret;
127} 127}
128 128
129static struct regulator_ops pfuze100_ldo_regulator_ops = { 129static const struct regulator_ops pfuze100_ldo_regulator_ops = {
130 .enable = regulator_enable_regmap, 130 .enable = regulator_enable_regmap,
131 .disable = regulator_disable_regmap, 131 .disable = regulator_disable_regmap,
132 .is_enabled = regulator_is_enabled_regmap, 132 .is_enabled = regulator_is_enabled_regmap,
@@ -135,14 +135,14 @@ static struct regulator_ops pfuze100_ldo_regulator_ops = {
135 .get_voltage_sel = regulator_get_voltage_sel_regmap, 135 .get_voltage_sel = regulator_get_voltage_sel_regmap,
136}; 136};
137 137
138static struct regulator_ops pfuze100_fixed_regulator_ops = { 138static const struct regulator_ops pfuze100_fixed_regulator_ops = {
139 .enable = regulator_enable_regmap, 139 .enable = regulator_enable_regmap,
140 .disable = regulator_disable_regmap, 140 .disable = regulator_disable_regmap,
141 .is_enabled = regulator_is_enabled_regmap, 141 .is_enabled = regulator_is_enabled_regmap,
142 .list_voltage = regulator_list_voltage_linear, 142 .list_voltage = regulator_list_voltage_linear,
143}; 143};
144 144
145static struct regulator_ops pfuze100_sw_regulator_ops = { 145static const struct regulator_ops pfuze100_sw_regulator_ops = {
146 .list_voltage = regulator_list_voltage_linear, 146 .list_voltage = regulator_list_voltage_linear,
147 .set_voltage_sel = regulator_set_voltage_sel_regmap, 147 .set_voltage_sel = regulator_set_voltage_sel_regmap,
148 .get_voltage_sel = regulator_get_voltage_sel_regmap, 148 .get_voltage_sel = regulator_get_voltage_sel_regmap,
@@ -150,7 +150,7 @@ static struct regulator_ops pfuze100_sw_regulator_ops = {
150 .set_ramp_delay = pfuze100_set_ramp_delay, 150 .set_ramp_delay = pfuze100_set_ramp_delay,
151}; 151};
152 152
153static struct regulator_ops pfuze100_swb_regulator_ops = { 153static const struct regulator_ops pfuze100_swb_regulator_ops = {
154 .enable = regulator_enable_regmap, 154 .enable = regulator_enable_regmap,
155 .disable = regulator_disable_regmap, 155 .disable = regulator_disable_regmap,
156 .list_voltage = regulator_list_voltage_table, 156 .list_voltage = regulator_list_voltage_table,