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

regulator: fan53555: 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/fan53555.o
text data bss dec hex filename
3512 496 8 4016 fb0 drivers/regulator/fan53555.o

File size after: drivers/regulator/fan53555.o
text data bss dec hex filename
3768 240 8 4016 fb0 drivers/regulator/fan53555.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Bhumika Goyal and committed by
Mark Brown
71880ab2 d00b7461

+1 -1
+1 -1
drivers/regulator/fan53555.c
··· 202 202 CTL_SLEW_MASK, regval << CTL_SLEW_SHIFT); 203 203 } 204 204 205 - static struct regulator_ops fan53555_regulator_ops = { 205 + static const struct regulator_ops fan53555_regulator_ops = { 206 206 .set_voltage_sel = regulator_set_voltage_sel_regmap, 207 207 .get_voltage_sel = regulator_get_voltage_sel_regmap, 208 208 .set_voltage_time_sel = regulator_set_voltage_time_sel,