regulator: da9*: constify regulator_ops structures
The regulator_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committato da
Mark Brown

parent
8005c49d9a
commit
71242b49a0
@@ -257,7 +257,7 @@ static const struct regulator_linear_range da9034_ldo12_ranges[] = {
|
||||
REGULATOR_LINEAR_RANGE(2700000, 8, 15, 50000),
|
||||
};
|
||||
|
||||
static struct regulator_ops da903x_regulator_ldo_ops = {
|
||||
static const struct regulator_ops da903x_regulator_ldo_ops = {
|
||||
.set_voltage_sel = da903x_set_voltage_sel,
|
||||
.get_voltage_sel = da903x_get_voltage_sel,
|
||||
.list_voltage = regulator_list_voltage_linear,
|
||||
@@ -268,7 +268,7 @@ static struct regulator_ops da903x_regulator_ldo_ops = {
|
||||
};
|
||||
|
||||
/* NOTE: this is dedicated for the insane DA9030 LDO14 */
|
||||
static struct regulator_ops da9030_regulator_ldo14_ops = {
|
||||
static const struct regulator_ops da9030_regulator_ldo14_ops = {
|
||||
.set_voltage_sel = da903x_set_voltage_sel,
|
||||
.get_voltage_sel = da903x_get_voltage_sel,
|
||||
.list_voltage = da9030_list_ldo14_voltage,
|
||||
@@ -279,7 +279,7 @@ static struct regulator_ops da9030_regulator_ldo14_ops = {
|
||||
};
|
||||
|
||||
/* NOTE: this is dedicated for the DA9030 LDO1 and LDO15 that have locks */
|
||||
static struct regulator_ops da9030_regulator_ldo1_15_ops = {
|
||||
static const struct regulator_ops da9030_regulator_ldo1_15_ops = {
|
||||
.set_voltage_sel = da9030_set_ldo1_15_voltage_sel,
|
||||
.get_voltage_sel = da903x_get_voltage_sel,
|
||||
.list_voltage = regulator_list_voltage_linear,
|
||||
@@ -289,7 +289,7 @@ static struct regulator_ops da9030_regulator_ldo1_15_ops = {
|
||||
.is_enabled = da903x_is_enabled,
|
||||
};
|
||||
|
||||
static struct regulator_ops da9034_regulator_dvc_ops = {
|
||||
static const struct regulator_ops da9034_regulator_dvc_ops = {
|
||||
.set_voltage_sel = da9034_set_dvc_voltage_sel,
|
||||
.get_voltage_sel = da903x_get_voltage_sel,
|
||||
.list_voltage = regulator_list_voltage_linear,
|
||||
@@ -300,7 +300,7 @@ static struct regulator_ops da9034_regulator_dvc_ops = {
|
||||
};
|
||||
|
||||
/* NOTE: this is dedicated for the insane LDO12 */
|
||||
static struct regulator_ops da9034_regulator_ldo12_ops = {
|
||||
static const struct regulator_ops da9034_regulator_ldo12_ops = {
|
||||
.set_voltage_sel = da903x_set_voltage_sel,
|
||||
.get_voltage_sel = da903x_get_voltage_sel,
|
||||
.list_voltage = regulator_list_voltage_linear_range,
|
||||
|
Fai riferimento in un nuovo problema
Block a user