diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2017-01-28 09:32:32 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-01-31 15:54:26 -0500 |
commit | 88c9d47aa4f7ee9f086f6fcb7e7b6a59e3380462 (patch) | |
tree | e59887342f48f5d4bebaee20e805eff6ef9953c9 | |
parent | d00b74613fb18dfd0a5aa99270ee2e72d5c808d7 (diff) |
regulator: max8907-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/max8907-regulator.o
text data bss dec hex filename
1384 9424 256 11064 2b38 regulator/max8907-regulator.o
File size after: drivers/regulator/max8907-regulator.o
text data bss dec hex filename
2664 8400 0 11064 2b38 regulator/max8907-regulator.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/max8907-regulator.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index 5e941db5ccaf..860400d2cd85 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c | |||
@@ -109,7 +109,7 @@ struct max8907_regulator { | |||
109 | #define LDO_650_25(id, supply, base) REG_LDO(id, supply, (base), \ | 109 | #define LDO_650_25(id, supply, base) REG_LDO(id, supply, (base), \ |
110 | 650000, 2225000, 25000) | 110 | 650000, 2225000, 25000) |
111 | 111 | ||
112 | static struct regulator_ops max8907_mbatt_ops = { | 112 | static const struct regulator_ops max8907_mbatt_ops = { |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static struct regulator_ops max8907_ldo_ops = { | 115 | static struct regulator_ops max8907_ldo_ops = { |
@@ -121,13 +121,13 @@ static struct regulator_ops max8907_ldo_ops = { | |||
121 | .is_enabled = regulator_is_enabled_regmap, | 121 | .is_enabled = regulator_is_enabled_regmap, |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static struct regulator_ops max8907_ldo_hwctl_ops = { | 124 | static const struct regulator_ops max8907_ldo_hwctl_ops = { |
125 | .list_voltage = regulator_list_voltage_linear, | 125 | .list_voltage = regulator_list_voltage_linear, |
126 | .set_voltage_sel = regulator_set_voltage_sel_regmap, | 126 | .set_voltage_sel = regulator_set_voltage_sel_regmap, |
127 | .get_voltage_sel = regulator_get_voltage_sel_regmap, | 127 | .get_voltage_sel = regulator_get_voltage_sel_regmap, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static struct regulator_ops max8907_fixed_ops = { | 130 | static const struct regulator_ops max8907_fixed_ops = { |
131 | .list_voltage = regulator_list_voltage_linear, | 131 | .list_voltage = regulator_list_voltage_linear, |
132 | }; | 132 | }; |
133 | 133 | ||
@@ -138,11 +138,11 @@ static struct regulator_ops max8907_out5v_ops = { | |||
138 | .is_enabled = regulator_is_enabled_regmap, | 138 | .is_enabled = regulator_is_enabled_regmap, |
139 | }; | 139 | }; |
140 | 140 | ||
141 | static struct regulator_ops max8907_out5v_hwctl_ops = { | 141 | static const struct regulator_ops max8907_out5v_hwctl_ops = { |
142 | .list_voltage = regulator_list_voltage_linear, | 142 | .list_voltage = regulator_list_voltage_linear, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | static struct regulator_ops max8907_bbat_ops = { | 145 | static const struct regulator_ops max8907_bbat_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, |