Skip to content

Commit

Permalink
regulator: max8649: Constify struct regmap_config and regulator_ops
Browse files Browse the repository at this point in the history
The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const. Make struct
regulator_ops const as well.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Mark Brown committed Jan 5, 2015
1 parent 97bf6af commit 035f332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/regulator/max8649.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static unsigned int max8649_get_mode(struct regulator_dev *rdev)
return REGULATOR_MODE_NORMAL;
}

static struct regulator_ops max8649_dcdc_ops = {
static const struct regulator_ops max8649_dcdc_ops = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear,
Expand Down Expand Up @@ -143,7 +143,7 @@ static struct regulator_desc dcdc_desc = {
.enable_is_inverted = true,
};

static struct regmap_config max8649_regmap_config = {
static const struct regmap_config max8649_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
};
Expand Down

0 comments on commit 035f332

Please sign in to comment.