regulator: lp3971: Constify lp3971_ldo_ops and lp3971_dcdc_ops
PATCH 1/8 regulator: lp3971: Constify lp3971_ldo_ops and lp3971_dcdc_ops
Signed-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp3971.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/lp3971.c +2 -2
@@ -159,7 +159,7 @@ static int lp3971_ldo_set_voltage_sel(struct regulator_dev *dev, selector << LDO_VOL_CONTR_SHIFT(ldo)); } -static struct regulator_ops lp3971_ldo_ops = { +static const struct regulator_ops lp3971_ldo_ops = { .list_voltage = regulator_list_voltage_table, .map_voltage = regulator_map_voltage_ascend, .is_enabled = lp3971_ldo_is_enabled,
@@ -233,7 +233,7 @@ static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev, 0 << BUCK_VOL_CHANGE_SHIFT(buck)); } -static struct regulator_ops lp3971_dcdc_ops = { +static const struct regulator_ops lp3971_dcdc_ops = { .list_voltage = regulator_list_voltage_table, .map_voltage = regulator_map_voltage_ascend, .is_enabled = lp3971_dcdc_is_enabled,
Signature · 1 line
2.17.1
PATCH 2/8 regulator: lp3972: Constify lp3972_ldo_ops and lp3972_dcdc_ops
Signed-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp3972.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/lp3972.c +2 -2
@@ -305,7 +305,7 @@ static int lp3972_ldo_set_voltage_sel(struct regulator_dev *dev,return ret; } -static struct regulator_ops lp3972_ldo_ops = { +static const struct regulator_ops lp3972_ldo_ops = { .list_voltage = regulator_list_voltage_table, .map_voltage = regulator_map_voltage_ascend, .is_enabled = lp3972_ldo_is_enabled,
@@ -386,7 +386,7 @@ static int lp3972_dcdc_set_voltage_sel(struct regulator_dev *dev, LP3972_VOL_CHANGE_FLAG_MASK, 0); } -static struct regulator_ops lp3972_dcdc_ops = { +static const struct regulator_ops lp3972_dcdc_ops = { .list_voltage = regulator_list_voltage_table, .map_voltage = regulator_map_voltage_ascend, .is_enabled = lp3972_dcdc_is_enabled,
Signature · 1 line
2.17.1
PATCH 3/8 regulator: lp872x: Constify regulator_ops and regulator_desc
In reply to Axel LinSigned-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp872x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/regulator/lp872x.c +6 -6
@@ -478,7 +478,7 @@ static unsigned int lp872x_buck_get_mode(struct regulator_dev *rdev)return val & mask ?REGULATOR_MODE_FAST :REGULATOR_MODE_NORMAL ; } -static struct regulator_ops lp872x_ldo_ops = { +static const struct regulator_ops lp872x_ldo_ops = { .list_voltage = regulator_list_voltage_table, .map_voltage = regulator_map_voltage_ascend, .set_voltage_sel = regulator_set_voltage_sel_regmap,
@@ -489,7 +489,7 @@ static struct regulator_ops lp872x_ldo_ops = { .enable_time = lp872x_regulator_enable_time, }; -static struct regulator_ops lp8720_buck_ops = { +static const struct regulator_ops lp8720_buck_ops = { .list_voltage = regulator_list_voltage_table, .map_voltage = regulator_map_voltage_ascend, .set_voltage_sel = lp872x_buck_set_voltage_sel,
@@ -502,7 +502,7 @@ static struct regulator_ops lp8720_buck_ops = { .get_mode = lp872x_buck_get_mode, }; -static struct regulator_ops lp8725_buck_ops = { +static const struct regulator_ops lp8725_buck_ops = { .list_voltage = regulator_list_voltage_table, .map_voltage = regulator_map_voltage_ascend, .set_voltage_sel = lp872x_buck_set_voltage_sel,
@@ -517,7 +517,7 @@ static struct regulator_ops lp8725_buck_ops = { .get_current_limit = lp8725_buck_get_current_limit, }; -static struct regulator_desc lp8720_regulator_desc[] = { +static const struct regulator_desc lp8720_regulator_desc[] = { { .name ="ldo1" , .of_match =of_match_ptr ("ldo1" ),
@@ -602,7 +602,7 @@ static struct regulator_desc lp8720_regulator_desc[] = { }, }; -static struct regulator_desc lp8725_regulator_desc[] = { +static const struct regulator_desc lp8725_regulator_desc[] = { { .name ="ldo1" , .of_match =of_match_ptr ("ldo1" ),
@@ -820,7 +820,7 @@ static struct regulator_init_datastatic int lp872x_regulator_register (struct lp872x *lp) { -struct regulator_desc *desc; +const struct regulator_desc *desc;struct regulator_config cfg = { };struct regulator_dev *rdev;int i;
Signature · 1 line
2.17.1
PATCH 4/8 regulator: lp873x: Constify lp873x_buck01_ops and lp873x_ldo01_ops
In reply to Axel LinSigned-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp873x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/lp873x-regulator.c +2 -2
@@ -146,7 +146,7 @@ static int lp873x_buck_get_current_limit(struct regulator_dev *rdev) }/* Operations permitted on BUCK0, BUCK1 */ -static struct regulator_ops lp873x_buck01_ops = { +static const struct regulator_ops lp873x_buck01_ops = { .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap,
@@ -161,7 +161,7 @@ static struct regulator_ops lp873x_buck01_ops = { };/* Operations permitted on LDO0 and LDO1 */ -static struct regulator_ops lp873x_ldo01_ops = { +static const struct regulator_ops lp873x_ldo01_ops = { .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap,
Signature · 1 line
2.17.1
PATCH 5/8 regulator: lp8755: Constify lp8755_regulators
In reply to Axel LinSigned-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp8755.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/lp8755.c +1 -1
@@ -315,7 +315,7 @@ static int lp8755_init_data(struct lp8755_chip *pchip) .vsel_mask = LP8755_BUCK_VOUT_M,\ } -static struct regulator_desc lp8755_regulators[] = { +static const struct regulator_desc lp8755_regulators[] = {lp8755_buck_desc (0 ),lp8755_buck_desc (1 ),lp8755_buck_desc (2 ),
Signature · 1 line
2.17.1
PATCH 6/8 regulator: lp87565: Constify lp87565_buck_ramp_delay and lp87565_buck_ops
In reply to Axel LinSigned-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp87565-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/lp87565-regulator.c +2 -2
@@ -51,7 +51,7 @@ static const struct regulator_linear_range buck0_1_2_3_ranges[] = { REGULATOR_LINEAR_RANGE(1420000, 0x9e, 0xff, 20000), }; -static unsigned int lp87565_buck_ramp_delay[] = { +static const unsigned int lp87565_buck_ramp_delay[] = {30000 ,15000 ,10000 ,7500 ,3800 ,1900 ,940 ,470 };
@@ -140,7 +140,7 @@ static int lp87565_buck_get_current_limit(struct regulator_dev *rdev) }/* Operations permitted on BUCK0, BUCK1 */ -static struct regulator_ops lp87565_buck_ops = { +static const struct regulator_ops lp87565_buck_ops = { .is_enabled = regulator_is_enabled_regmap, .enable = regulator_enable_regmap, .disable = regulator_disable_regmap,
Signature · 1 line
2.17.1
PATCH 7/8 regulator: lp8788-buck: Constify lp8788_buck_desc
In reply to Axel LinSigned-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp8788-buck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/lp8788-buck.c +1 -1
@@ -370,7 +370,7 @@ static const struct regulator_ops lp8788_buck34_ops = { .get_mode = lp8788_buck_get_mode, }; -static struct regulator_desc lp8788_buck_desc[] = { +static const struct regulator_desc lp8788_buck_desc[] = { { .name ="buck1" , .id =BUCK1 ,
Signature · 1 line
2.17.1
PATCH 8/8 regulator: lp8788-ldo: Constify lp8788_dldo_desc and lp8788_aldo_desc
In reply to Axel LinSigned-off-by Axel Lin <[email protected]>
--- drivers/regulator/lp8788-ldo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/lp8788-ldo.c +2 -2
@@ -186,7 +186,7 @@ static const struct regulator_ops lp8788_ldo_voltage_fixed_ops = { .enable_time = lp8788_ldo_enable_time, }; -static struct regulator_desc lp8788_dldo_desc[] = { +static const struct regulator_desc lp8788_dldo_desc[] = { { .name ="dldo1" , .id =DLDO1 ,
@@ -343,7 +343,7 @@ static struct regulator_desc lp8788_dldo_desc[] = { }, }; -static struct regulator_desc lp8788_aldo_desc[] = { +static const struct regulator_desc lp8788_aldo_desc[] = { { .name ="aldo1" , .id =ALDO1 ,
Signature · 1 line
2.17.1