1
0
Fork 0

regulator: twl6030: Constify regulator_ops

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
hifive-unleashed-5.1
Axel Lin 2019-02-17 21:48:09 +08:00 committed by Mark Brown
parent 4a43870ae1
commit 606640bbbe
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 4 additions and 4 deletions

View File

@ -244,7 +244,7 @@ static int twl6030coresmps_get_voltage(struct regulator_dev *rdev)
return -ENODEV; return -ENODEV;
} }
static struct regulator_ops twl6030coresmps_ops = { static const struct regulator_ops twl6030coresmps_ops = {
.set_voltage = twl6030coresmps_set_voltage, .set_voltage = twl6030coresmps_set_voltage,
.get_voltage = twl6030coresmps_get_voltage, .get_voltage = twl6030coresmps_get_voltage,
}; };
@ -266,7 +266,7 @@ static int twl6030ldo_get_voltage_sel(struct regulator_dev *rdev)
return vsel; return vsel;
} }
static struct regulator_ops twl6030ldo_ops = { static const struct regulator_ops twl6030ldo_ops = {
.list_voltage = regulator_list_voltage_linear_range, .list_voltage = regulator_list_voltage_linear_range,
.set_voltage_sel = twl6030ldo_set_voltage_sel, .set_voltage_sel = twl6030ldo_set_voltage_sel,
@ -281,7 +281,7 @@ static struct regulator_ops twl6030ldo_ops = {
.get_status = twl6030reg_get_status, .get_status = twl6030reg_get_status,
}; };
static struct regulator_ops twl6030fixed_ops = { static const struct regulator_ops twl6030fixed_ops = {
.list_voltage = regulator_list_voltage_linear, .list_voltage = regulator_list_voltage_linear,
.enable = twl6030reg_enable, .enable = twl6030reg_enable,
@ -472,7 +472,7 @@ static int twl6030smps_get_voltage_sel(struct regulator_dev *rdev)
return twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_VOLTAGE_SMPS); return twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_VOLTAGE_SMPS);
} }
static struct regulator_ops twlsmps_ops = { static const struct regulator_ops twlsmps_ops = {
.list_voltage = twl6030smps_list_voltage, .list_voltage = twl6030smps_list_voltage,
.map_voltage = twl6030smps_map_voltage, .map_voltage = twl6030smps_map_voltage,