diff --git a/drivers/regulator/max77802-regulator.c b/drivers/regulator/max77802-regulator.c index 1d3539324d9a..b6261903818c 100644 --- a/drivers/regulator/max77802-regulator.c +++ b/drivers/regulator/max77802-regulator.c @@ -288,7 +288,7 @@ static int max77802_set_ramp_delay_4bit(struct regulator_dev *rdev, /* * LDOs 2, 4-19, 22-35 */ -static struct regulator_ops max77802_ldo_ops_logic1 = { +static const struct regulator_ops max77802_ldo_ops_logic1 = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -304,7 +304,7 @@ static struct regulator_ops max77802_ldo_ops_logic1 = { /* * LDOs 1, 20, 21, 3 */ -static struct regulator_ops max77802_ldo_ops_logic2 = { +static const struct regulator_ops max77802_ldo_ops_logic2 = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -319,7 +319,7 @@ static struct regulator_ops max77802_ldo_ops_logic2 = { }; /* BUCKS 1, 6 */ -static struct regulator_ops max77802_buck_16_dvs_ops = { +static const struct regulator_ops max77802_buck_16_dvs_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -333,7 +333,7 @@ static struct regulator_ops max77802_buck_16_dvs_ops = { }; /* BUCKs 2-4 */ -static struct regulator_ops max77802_buck_234_ops = { +static const struct regulator_ops max77802_buck_234_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, @@ -348,7 +348,7 @@ static struct regulator_ops max77802_buck_234_ops = { }; /* BUCKs 5, 7-10 */ -static struct regulator_ops max77802_buck_dvs_ops = { +static const struct regulator_ops max77802_buck_dvs_ops = { .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, .is_enabled = regulator_is_enabled_regmap, 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 { #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, diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index c802f0239dc7..39b63ddefeb2 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c @@ -132,7 +132,7 @@ static int max8925_set_dvm_disable(struct regulator_dev *rdev) return max8925_set_bits(info->i2c, info->vol_reg, 1 << SD1_DVM_EN, 0); } -static struct regulator_ops max8925_regulator_sdv_ops = { +static const struct regulator_ops max8925_regulator_sdv_ops = { .map_voltage = regulator_map_voltage_linear, .list_voltage = regulator_list_voltage_linear, .set_voltage_sel = max8925_set_voltage_sel, @@ -145,7 +145,7 @@ static struct regulator_ops max8925_regulator_sdv_ops = { .set_suspend_disable = max8925_set_dvm_disable, }; -static struct regulator_ops max8925_regulator_ldo_ops = { +static const struct regulator_ops max8925_regulator_ldo_ops = { .map_voltage = regulator_map_voltage_linear, .list_voltage = regulator_list_voltage_linear, .set_voltage_sel = max8925_set_voltage_sel, diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index 1af8f4a2ab86..1096546c05e9 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -113,7 +113,7 @@ static int max8952_set_voltage_sel(struct regulator_dev *rdev, return 0; } -static struct regulator_ops max8952_ops = { +static const struct regulator_ops max8952_ops = { .list_voltage = max8952_list_voltage, .get_voltage_sel = max8952_get_voltage_sel, .set_voltage_sel = max8952_set_voltage_sel, diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index f11d41dad9c1..31ae5ee3a80d 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -528,7 +528,7 @@ static int palmas_smps_set_ramp_delay(struct regulator_dev *rdev, return ret; } -static struct regulator_ops palmas_ops_smps = { +static const struct regulator_ops palmas_ops_smps = { .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, @@ -542,7 +542,7 @@ static struct regulator_ops palmas_ops_smps = { .set_ramp_delay = palmas_smps_set_ramp_delay, }; -static struct regulator_ops palmas_ops_ext_control_smps = { +static const struct regulator_ops palmas_ops_ext_control_smps = { .set_mode = palmas_set_mode_smps, .get_mode = palmas_get_mode_smps, .get_voltage_sel = regulator_get_voltage_sel_regmap, @@ -553,7 +553,7 @@ static struct regulator_ops palmas_ops_ext_control_smps = { .set_ramp_delay = palmas_smps_set_ramp_delay, }; -static struct regulator_ops palmas_ops_smps10 = { +static const struct regulator_ops palmas_ops_smps10 = { .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, @@ -565,7 +565,7 @@ static struct regulator_ops palmas_ops_smps10 = { .get_bypass = regulator_get_bypass_regmap, }; -static struct regulator_ops tps65917_ops_smps = { +static const struct regulator_ops tps65917_ops_smps = { .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, @@ -578,7 +578,7 @@ static struct regulator_ops tps65917_ops_smps = { .set_voltage_time_sel = regulator_set_voltage_time_sel, }; -static struct regulator_ops tps65917_ops_ext_control_smps = { +static const struct regulator_ops tps65917_ops_ext_control_smps = { .set_mode = palmas_set_mode_smps, .get_mode = palmas_get_mode_smps, .get_voltage_sel = regulator_get_voltage_sel_regmap, @@ -602,7 +602,7 @@ static int palmas_is_enabled_ldo(struct regulator_dev *dev) return !!(reg); } -static struct regulator_ops palmas_ops_ldo = { +static const struct regulator_ops palmas_ops_ldo = { .is_enabled = palmas_is_enabled_ldo, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, @@ -612,7 +612,7 @@ static struct regulator_ops palmas_ops_ldo = { .map_voltage = regulator_map_voltage_linear, }; -static struct regulator_ops palmas_ops_ldo9 = { +static const struct regulator_ops palmas_ops_ldo9 = { .is_enabled = palmas_is_enabled_ldo, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, @@ -624,23 +624,23 @@ static struct regulator_ops palmas_ops_ldo9 = { .get_bypass = regulator_get_bypass_regmap, }; -static struct regulator_ops palmas_ops_ext_control_ldo = { +static const struct regulator_ops palmas_ops_ext_control_ldo = { .get_voltage_sel = regulator_get_voltage_sel_regmap, .set_voltage_sel = regulator_set_voltage_sel_regmap, .list_voltage = regulator_list_voltage_linear, .map_voltage = regulator_map_voltage_linear, }; -static struct regulator_ops palmas_ops_extreg = { +static const struct regulator_ops palmas_ops_extreg = { .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, }; -static struct regulator_ops palmas_ops_ext_control_extreg = { +static const struct regulator_ops palmas_ops_ext_control_extreg = { }; -static struct regulator_ops tps65917_ops_ldo = { +static const struct regulator_ops tps65917_ops_ldo = { .is_enabled = palmas_is_enabled_ldo, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, @@ -651,7 +651,7 @@ static struct regulator_ops tps65917_ops_ldo = { .set_voltage_time_sel = regulator_set_voltage_time_sel, }; -static struct regulator_ops tps65917_ops_ldo_1_2 = { +static const struct regulator_ops tps65917_ops_ldo_1_2 = { .is_enabled = palmas_is_enabled_ldo, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap,