Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: tps65218: Constify regulator_ops

These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
d1030b43 a71bcdfe

+4 -4
+4 -4
drivers/regulator/tps65218-regulator.c
··· 162 162 } 163 163 164 164 /* Operations permitted on DCDC1, DCDC2 */ 165 - static struct regulator_ops tps65218_dcdc12_ops = { 165 + static const struct regulator_ops tps65218_dcdc12_ops = { 166 166 .is_enabled = regulator_is_enabled_regmap, 167 167 .enable = tps65218_pmic_enable, 168 168 .disable = tps65218_pmic_disable, ··· 176 176 }; 177 177 178 178 /* Operations permitted on DCDC3, DCDC4 and LDO1 */ 179 - static struct regulator_ops tps65218_ldo1_dcdc34_ops = { 179 + static const struct regulator_ops tps65218_ldo1_dcdc34_ops = { 180 180 .is_enabled = regulator_is_enabled_regmap, 181 181 .enable = tps65218_pmic_enable, 182 182 .disable = tps65218_pmic_disable, ··· 245 245 return ls3_currents[index]; 246 246 } 247 247 248 - static struct regulator_ops tps65218_ls23_ops = { 248 + static const struct regulator_ops tps65218_ls23_ops = { 249 249 .is_enabled = regulator_is_enabled_regmap, 250 250 .enable = tps65218_pmic_enable, 251 251 .disable = tps65218_pmic_disable, ··· 255 255 }; 256 256 257 257 /* Operations permitted on DCDC5, DCDC6 */ 258 - static struct regulator_ops tps65218_dcdc56_pmic_ops = { 258 + static const struct regulator_ops tps65218_dcdc56_pmic_ops = { 259 259 .is_enabled = regulator_is_enabled_regmap, 260 260 .enable = tps65218_pmic_enable, 261 261 .disable = tps65218_pmic_disable,