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

regulator: max8649: Constify struct regmap_config and regulator_ops

The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const. Make struct
regulator_ops const as well.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
035f3324 97bf6af1

+2 -2
+2 -2
drivers/regulator/max8649.c
··· 115 115 return REGULATOR_MODE_NORMAL; 116 116 } 117 117 118 - static struct regulator_ops max8649_dcdc_ops = { 118 + static const struct regulator_ops max8649_dcdc_ops = { 119 119 .set_voltage_sel = regulator_set_voltage_sel_regmap, 120 120 .get_voltage_sel = regulator_get_voltage_sel_regmap, 121 121 .list_voltage = regulator_list_voltage_linear, ··· 143 143 .enable_is_inverted = true, 144 144 }; 145 145 146 - static struct regmap_config max8649_regmap_config = { 146 + static const struct regmap_config max8649_regmap_config = { 147 147 .reg_bits = 8, 148 148 .val_bits = 8, 149 149 };