aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-01-28 09:15:02 -0500
committerMark Brown <broonie@kernel.org>2017-01-31 15:48:35 -0500
commitf9e93acc14d1867176afaf3ab9bded914cd012f5 (patch)
treee3fc4663081a8674a934fe7ff60adba0ad67dc24
parentd00b74613fb18dfd0a5aa99270ee2e72d5c808d7 (diff)
regulator: ltc3676: 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/ltc3676.o text data bss dec hex filename 2369 2808 288 5465 1559 drivers/regulator/ltc3676.o File size after: drivers/regulator/ltc3676.o text data bss dec hex filename 3145 2296 8 5449 1549 drivers/regulator/ltc3676.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/ltc3676.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/ltc3676.c b/drivers/regulator/ltc3676.c
index e2b476ca2b4d..503cd90eba39 100644
--- a/drivers/regulator/ltc3676.c
+++ b/drivers/regulator/ltc3676.c
@@ -161,7 +161,7 @@ static int ltc3676_of_parse_cb(struct device_node *np,
161} 161}
162 162
163/* SW1, SW2, SW3, SW4 linear 0.8V-3.3V with scalar via R1/R2 feeback res */ 163/* SW1, SW2, SW3, SW4 linear 0.8V-3.3V with scalar via R1/R2 feeback res */
164static struct regulator_ops ltc3676_linear_regulator_ops = { 164static const struct regulator_ops ltc3676_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,
@@ -173,11 +173,11 @@ static struct regulator_ops ltc3676_linear_regulator_ops = {
173}; 173};
174 174
175/* LDO1 always on fixed 0.8V-3.3V via scalar via R1/R2 feeback res */ 175/* LDO1 always on fixed 0.8V-3.3V via scalar via R1/R2 feeback res */
176static struct regulator_ops ltc3676_fixed_standby_regulator_ops = { 176static const struct regulator_ops ltc3676_fixed_standby_regulator_ops = {
177}; 177};
178 178
179/* LDO2, LDO3 fixed (LDO2 has external scalar via R1/R2 feedback res) */ 179/* LDO2, LDO3 fixed (LDO2 has external scalar via R1/R2 feedback res) */
180static struct regulator_ops ltc3676_fixed_regulator_ops = { 180static const struct regulator_ops ltc3676_fixed_regulator_ops = {
181 .enable = regulator_enable_regmap, 181 .enable = regulator_enable_regmap,
182 .disable = regulator_disable_regmap, 182 .disable = regulator_disable_regmap,
183 .is_enabled = regulator_is_enabled_regmap, 183 .is_enabled = regulator_is_enabled_regmap,