diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2017-01-28 09:13:54 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-01-31 15:47:07 -0500 |
commit | c093c3a3db9d200461f3db52aadb611c87df357d (patch) | |
tree | da8a4dbd14b22d24b1ec3ea3bee4915262d93c5c | |
parent | d42797a416ff8c43cbf1366bc774a90870fb7cab (diff) |
regulator: ltc3589: 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/ltc3589.o
text data bss dec hex filename
2564 3312 288 6164 1814 drivers/regulator/ltc3589.o
File size after: drivers/regulator/ltc3589.o
text data bss dec hex filename
3604 2544 8 6156 180c drivers/regulator/ltc3589.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/ltc3589.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index 47bef328fb58..a7a1a0313bbf 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers/regulator/ltc3589.c | |||
@@ -161,7 +161,7 @@ static int ltc3589_set_suspend_mode(struct regulator_dev *rdev, | |||
161 | } | 161 | } |
162 | 162 | ||
163 | /* SW1, SW2, SW3, LDO2 */ | 163 | /* SW1, SW2, SW3, LDO2 */ |
164 | static struct regulator_ops ltc3589_linear_regulator_ops = { | 164 | static const struct regulator_ops ltc3589_linear_regulator_ops = { |
165 | .enable = regulator_enable_regmap, | 165 | .enable = regulator_enable_regmap, |
166 | .disable = regulator_disable_regmap, | 166 | .disable = regulator_disable_regmap, |
167 | .is_enabled = regulator_is_enabled_regmap, | 167 | .is_enabled = regulator_is_enabled_regmap, |
@@ -175,18 +175,18 @@ static struct regulator_ops ltc3589_linear_regulator_ops = { | |||
175 | }; | 175 | }; |
176 | 176 | ||
177 | /* BB_OUT, LDO3 */ | 177 | /* BB_OUT, LDO3 */ |
178 | static struct regulator_ops ltc3589_fixed_regulator_ops = { | 178 | static const struct regulator_ops ltc3589_fixed_regulator_ops = { |
179 | .enable = regulator_enable_regmap, | 179 | .enable = regulator_enable_regmap, |
180 | .disable = regulator_disable_regmap, | 180 | .disable = regulator_disable_regmap, |
181 | .is_enabled = regulator_is_enabled_regmap, | 181 | .is_enabled = regulator_is_enabled_regmap, |
182 | }; | 182 | }; |
183 | 183 | ||
184 | /* LDO1 */ | 184 | /* LDO1 */ |
185 | static struct regulator_ops ltc3589_fixed_standby_regulator_ops = { | 185 | static const struct regulator_ops ltc3589_fixed_standby_regulator_ops = { |
186 | }; | 186 | }; |
187 | 187 | ||
188 | /* LDO4 */ | 188 | /* LDO4 */ |
189 | static struct regulator_ops ltc3589_table_regulator_ops = { | 189 | static const struct regulator_ops ltc3589_table_regulator_ops = { |
190 | .enable = regulator_enable_regmap, | 190 | .enable = regulator_enable_regmap, |
191 | .disable = regulator_disable_regmap, | 191 | .disable = regulator_disable_regmap, |
192 | .is_enabled = regulator_is_enabled_regmap, | 192 | .is_enabled = regulator_is_enabled_regmap, |