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>
This commit is contained in:
Bhumika Goyal 2017-01-28 20:02:32 +05:30 committed by Mark Brown
parent d00b74613f
commit 88c9d47aa4
1 changed files with 5 additions and 5 deletions

View File

@ -109,7 +109,7 @@ struct max8907_regulator {
#define LDO_650_25(id, supply, base) REG_LDO(id, supply, (base), \
650000, 2225000, 25000)
static struct regulator_ops max8907_mbatt_ops = {
static const struct regulator_ops max8907_mbatt_ops = {
};
static struct regulator_ops max8907_ldo_ops = {
@ -121,13 +121,13 @@ static struct regulator_ops max8907_ldo_ops = {
.is_enabled = regulator_is_enabled_regmap,
};
static struct regulator_ops max8907_ldo_hwctl_ops = {
static const struct regulator_ops max8907_ldo_hwctl_ops = {
.list_voltage = regulator_list_voltage_linear,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
};
static struct regulator_ops max8907_fixed_ops = {
static const struct regulator_ops max8907_fixed_ops = {
.list_voltage = regulator_list_voltage_linear,
};
@ -138,11 +138,11 @@ static struct regulator_ops max8907_out5v_ops = {
.is_enabled = regulator_is_enabled_regmap,
};
static struct regulator_ops max8907_out5v_hwctl_ops = {
static const struct regulator_ops max8907_out5v_hwctl_ops = {
.list_voltage = regulator_list_voltage_linear,
};
static struct regulator_ops max8907_bbat_ops = {
static const struct regulator_ops max8907_bbat_ops = {
.list_voltage = regulator_list_voltage_linear,
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,